/*! * PowerReviews, Copyright 2022 * Build: 10349 | a2fb12897 | 5/27/2022 */!function(){var e,t={23650:function(e,t,r){e.exports=r(53822)},29406:function(e,t,r){e.exports=r(44877)},50381:function(e,t,r){e.exports=r(55603)},11052:function(e,t,r){e.exports=r(76237)},33093:function(e,t,r){e.exports=r(56515)},71899:function(e,t,r){e.exports=r(26174)},22788:function(e,t,r){e.exports=r(58384)},49401:function(e,t,r){e.exports=r(4380)},90899:function(e,t,r){e.exports=r(20057)},8717:function(e,t,r){e.exports=r(87760)},8005:function(e,t,r){e.exports=r(24741)},49924:function(e,t,r){e.exports=r(44612)},26562:function(e,t,r){e.exports=r(8368)},79131:function(e,t,r){e.exports=r(43739)},86166:function(e,t,r){e.exports=r(10986)},32142:function(e,t,r){e.exports=r(392)},36004:function(e,t,r){e.exports=r(42987)},50418:function(e,t,r){e.exports=r(28478)},31734:function(e,t,r){e.exports=r(27820)},50428:function(e,t,r){e.exports=r(58202)},42461:function(e,t,r){e.exports=r(45636)},33415:function(e,t,r){e.exports=r(96988)},45214:function(e,t,r){e.exports=r(55059)},66397:function(e,t,r){e.exports=r(83969)},98189:function(e,t,r){e.exports=r(46618)},16465:function(e,t,r){e.exports=r(37257)},29275:function(e,t,r){e.exports=r(72946)},23972:function(e,t,r){e.exports=r(10652)},97107:function(e,t,r){e.exports=r(11235)},87172:function(e,t,r){e.exports=r(62813)},91845:function(e,t,r){e.exports=r(68664)},10662:function(e,t,r){e.exports=r(21457)},51702:function(e,t,r){e.exports=r(38393)},41415:function(e,t,r){e.exports=r(87611)},83168:function(e,t,r){e.exports=r(4161)},55628:function(e,t,r){e.exports=r(75159)},20711:function(e,t,r){e.exports=r(42937)},16623:function(e,t,r){e.exports=r(69297)},1849:function(e,t,r){e.exports=r(10353)},7077:function(e,t,r){e.exports=r(8026)},47307:function(e,t,r){e.exports=r(67362)},32675:function(e,t,r){e.exports=r(57532)},5721:function(e,t,r){e.exports=r(61903)},79877:function(e,t,r){e.exports=r(60902)},44230:function(e,t,r){e.exports=r(2214)},67567:function(e,t,r){e.exports=r(983)},30184:function(e,t,r){e.exports=r(59256)},7413:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[c++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},22176:function(e,t,r){var n=r(7077);e.exports=function(e,t,r){return t in e?n(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},87480:function(e,t,r){var n=r(16623),i=r(3446);e.exports=function(e,t){e.prototype=n(t.prototype),e.prototype.constructor=e,i(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},22882:function(e,t,r){var n=r(79877),i=r(5721),o=r(41415),a=r(47307),s=r(83168),l=r(32675),c=r(1849),u=r(7077),d=r(22176);function p(e,t){var r=n(e);if(i){var s=i(e);t&&(s=o(s).call(s,(function(t){return a(e,t).enumerable}))),r.push.apply(r,s)}return r}e.exports=function(e){for(var t=1;t=0||(a[r]=e[r]);return a},e.exports.__esModule=!0,e.exports.default=e.exports},3446:function(e,t,r){var n=r(44230);function i(t,r){return e.exports=i=n||function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,i(t,r)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},67121:function(e,t,r){var n=r(20711);e.exports=function(e,t){return t||(t=n(e).call(e,0)),e.raw=t,e},e.exports.__esModule=!0,e.exports.default=e.exports},83856:function(e,t,r){var n=r(20711),i=r(87172),o=r(7413);e.exports=function(e,t){var r;if(e){if("string"==typeof e)return o(e,t);var a=n(r=Object.prototype.toString.call(e)).call(r,8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?i(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},20261:function(e,t,r){e.exports=r(25047)},42384:function(e,t,r){"use strict";function n(e){o.length||(i(),!0),o[o.length]=e}e.exports=n;var i,o=[],a=0;function s(){for(;a1024){for(var t=0,r=o.length-a;t"+i+""):(0,y.ZP)("min_characters.characters_remaining_plural",n.write_a_review).replace(/\{0\}/g,""+i+""),a=i>0&&!r?"pr-min-character-alert pr-text-danger":"pr-min-character-alert";return(0,E.jsxs)("div",{className:"pr-min-character-wrapper",children:[(0,E.jsx)(w.Z,{className:"pr-min-character-icon",success:i<=0}),(0,E.jsx)("p",{dangerouslySetInnerHTML:{__html:o},className:"pr-field-alert-char "+a})]})},r.getHelperText=function(){return this.props.helperText?(0,E.jsx)("div",{className:"pr-helper-text",children:this.props.helperText}):""},r.getCharactersLeft=function(){return this.props.maxCharacters?this.props.maxCharacters-this.state.currentValue.length:255},r.checkCharacterLimit=function(e,t){e.target.value.length>=this.props.maxCharacters&&this.props.maxCharacters&&(e.target.value=e.target.value.substring(0,this.props.maxCharacters)),this.setState({currentValue:e.target.value},t)},r.isCharacterLimitIndicatorVisible=function(e){return!!this.props.maxCharacters&&!!this.state.currentValue&&this.state.currentValue.length>=this.props.maxCharacters-e},r.updateCollection=function(e,t,r,n){void 0===n&&(n=_.ZP.OFF);var o={id:e,values:t,isValid:g.K0(t,this.props.isRequired,this.props.validationType),syncStatus:n};if(r&&(o.choices=r),this.props.handleFieldUpdate){o.id;var a=i()(o,S);this.props.handleFieldUpdate(a,e)}},r.update=function(e,t){var r={id:e,value:t,isValid:g.K0(t,this.props.isRequired,this.props.validationType)};if(this.props.handleFieldUpdate){var n=i()(r,C);this.props.handleFieldUpdate(n,e)}},r.isErrorVisible=function(){return!!this.props.error},t}(m.Component);j.defaultProps={preset:null,isValid:!0,isRequired:!1,isVisible:!0,showLabel:!0},t.Z=j},62173:function(e,t,r){"use strict";var n=r(57101),i=r.n(n),o=r(87480),a=r.n(o),s=r(22176),l=r.n(s),c=r(2784),u=r(28316),d=r(57647),p=r.n(d),f=r(51519),h=r(52322),m=function(e){function t(t){var r;return(r=e.call(this,t)||this).state={clicked:!1,tooltip:!1,fallback:!1},r.attachClipboardListener=r.attachClipboardListener.bind(i()(r)),r.removeClipboardListener=r.removeClipboardListener.bind(i()(r)),r.activateTooltip=r.activateTooltip.bind(i()(r)),r.deactivateTooltip=r.deactivateTooltip.bind(i()(r)),r}a()(t,e);var r=t.prototype;return r.componentDidMount=function(){this.attachClipboardListener()},r.componentDidUpdate=function(){this.removeClipboardListener(),this.attachClipboardListener()},r.componentWillUnmount=function(){this.removeClipboardListener()},r.getTooltipText=function(){if(!this.props.localizations)return"";if(!this.state.fallback)return this.props.localizations.success;var e=(0,f.L9)();return"MAC"===e?this.props.localizations.mac:"WIN"===e?this.props.localizations.win:this.props.localizations.mobile},r.activateTooltip=function(){this.setState({tooltip:!0}),setTimeout(this.deactivateTooltip,3e3)},r.deactivateTooltip=function(){this.setState({tooltip:!1})},r.attachClipboardListener=function(){var e=this,t=new(p())(u.findDOMNode(this));t.on("error",(function(){e.setState({fallback:!0},e.activateTooltip),e.props.onError&&e.props.onError()})),this.props.onCopy&&t.on("success",this.props.onCopy),this.clipboard=t},r.removeClipboardListener=function(){this.clipboard&&this.clipboard.destroy()},r.render=function(){var e,t,r=this;this.state.tooltip&&(e="pr-tooltip pr-tooltip-under",t=this.getTooltipText());var n=this.props.onClick?this.state.clicked&&this.props.disabled:this.props.disabled;return(0,h.jsx)("button",{type:"button",className:(this.props.className||"pr-btn")+" "+(e||""),"data-clipboard-text":this.props.targetId?void 0:this.props.copyText,"data-clipboard-target":this.props.targetId,"aria-label":t,onMouseLeave:this.deactivateTooltip,onClick:function(){r.props.onClick&&(r.props.onClick(),r.setState({clicked:!0}))},disabled:n,children:this.props.children})},t}(c.Component);l()(m,"defaultProps",{localizations:{mac:"Press cmnd-c to copy",win:"Press ctrl-c to copy",mobile:"Copy the highlighted text",sucesss:"Copied!"}}),t.Z=m},21336:function(e,t,r){"use strict";r.d(t,{X6:function(){return f},y5:function(){return p}});var n=r(22882),i=r.n(n),o=r(63353),a=r.n(o),s=r(2784),l=r(20400),c=r(52322),u=["shouldUseSpan","className","importance"],d=s.createContext(),p=function(e){var t=e.initialLevel,r=e.children,n=s.useContext(d),i="number"==typeof n&&"number"!=typeof t?n+1:t;return-1===n&&(i=-1),(0,c.jsx)(d.Provider,{value:i,children:r})},f=function(e,t){var r,n=e.shouldUseSpan,o=e.className,p=e.importance,f=a()(e,u),h=s.useContext(d),m={};if(n||"number"!=typeof h||-1===h)return(0,c.jsx)(l.X,i()(i()({},e),{},{ref:t,importance:p}));h>6?(r="div",m["aria-level"]=h,m.role="heading"):r="h"+h;var v=o?o+" pr-h"+p:"pr-h"+p;return(0,c.jsx)(r,i()(i()(i()({},f),m),{},{ref:t,className:v}))};f=s.forwardRef(f)},82427:function(e,t,r){"use strict";r.d(t,{X6:function(){return n.X6},y5:function(){return n.y5}});var n=r(21336)},28501:function(e,t,r){"use strict";r.d(t,{W:function(){return j}});var n=r(22882),i=r.n(n),o=r(97941),a=r.n(o),s=r(86166),l=r.n(s),c=r(50381),u=r.n(c),d=(r(2784),r(13980)),p=r.n(d),f=r(95058),h=r(29691),m=r(3864),v=r(57969),g=r(11857),_=r(16183),y=r(83505),w=r(50628),b=r(71670),x=r(27353),E=r(5979),S=r(52322);function C(e,t){void 0===t&&(t=function(e){return e.submitted_value===e.value});var r=e.error_message&&e.error_message.message,n=t(e);if(r&&n)return!1;if("composite"===e.field_type&&Array.isArray(l()(e)))for(var i,o=a()(l()(e));!(i=o()).done;){var s=i.value;if(("Image"===s.composite_type||"NativeVideo"===s.composite_type||"Video"===s.composite_type)&&!C(s,(function(e){return e.submitted_caption===e.caption})))return!1}return e.isValid}function j(e,t){return!0===t?"pr-"+e:e}function I(e){var t,r,n=e.localizations,o=e.field,a=e.fieldIndex,s=e.starStyles,c=e.type,d=e.videoCollectionType,p=e.handleFieldUpdate,I=e.prependID,k=e.minCharacters,N=e.minRecommendedChars,R=null,P={fieldIndex:a,localizations:n,error:o.error_message,id:j(o.key,I),isRequired:o.required,isValid:C(o),isVisible:o.isVisible,hidden:o.hidden,label:o.label,validationType:o.validationType,handleFieldUpdate:p};if("TextBox"===o.input_type&&(R=(0,S.jsx)(f.Z,i()(i()({},P),{},{maxCharacters:o.max_length,placeholder:o.helper_text,helperText:o.example,preset:o.value,value:o.value,reactKey:o.reactKey,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))),"TextArea"===o.input_type&&(R=!k&&N>0?(0,S.jsx)(E.R,i()(i()({},P),{},{count:o.count,rows:o.rows,maxCharacters:o.maxCharacters,placeholder:o.helper_text,helperText:o.example,preset:o.value,reactKey:o.reactKey,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText,minRecommendedChars:N})):(0,S.jsx)(b.Z,i()(i()({},P),{},{count:o.count,rows:o.rows,maxCharacters:o.maxCharacters,minCharacters:k,placeholder:o.helper_text,helperText:o.example,preset:o.value,reactKey:o.reactKey,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))),"Stars"===o.input_type&&(R=(0,S.jsx)(m.Z,i()(i()({},P),{},{isSubrating:"rating"!==o.key,preset:o.value,reactKey:o.reactKey,starStyles:s||"",requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))),"CheckboxVertical"===o.input_type){var T=o.choices||[];R=(0,S.jsx)(v.Z,i()(i()({},P),{},{choices:T,helperText:o.helper_text,preset:o.preset,values:l()(o),requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))}if("AgeDisclosure"===o.input_type||"RadioVertical"===o.input_type||"RadioHorizontal"===o.input_type||"RadioHorizontalLinked"===o.input_type){var A=o.choices||[];R=(0,S.jsx)(g.Z,i()(i()({},P),{},{choices:A,helperText:o.helper_text,inputType:o.input_type,preset:o.value,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))}if("Dropdown"===o.input_type){var L=o.choices||[];R=(0,S.jsx)(_.Z,i()(i()({},P),{},{preset:o.value,tags:L,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))}("composite"===o.field_type&&"Simple"===o.composite_type&&(R=(0,S.jsx)(h.Z,i()(i()({},P),{},{clickToExpand:!0,count:o.count,helperText:o.helper_text,values:l()(o)||[],requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))),"composite"===o.field_type&&"Image"===o.composite_type)&&(R=(0,S.jsx)(y.Z,i()(i()({},P),{},{mediaType:o.composite_type,count:o.count,files:o.files,label:o.prompt||o.label,subfields:o.fields,values:l()(o),uploaded:l()(o)&&u()(t=l()(o)).call(t,(function(e){return e.isUploaded})).length,autoSubmit:!0,parentComponent:c,config:e.config,merchantProperties:e.merchantProperties,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText})));"composite"===o.field_type&&("NativeVideo"===o.composite_type||"Video"===o.composite_type&&"NATIVE"===d)&&(R=(0,S.jsx)(y.Z,i()(i()({},P),{},{isRequired:!1,mediaType:"Video",count:o.count,files:o.files,label:o.label||(0,x.ZP)("video.add_button_label",n.write_a_review),subfields:o.fields,values:l()(o),uploaded:l()(o)&&u()(r=l()(o)).call(r,(function(e){return e.isUploaded})).length,autoSubmit:!1,config:e.config,merchantProperties:e.merchantProperties,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText})));return"composite"===o.field_type&&"Video"===o.composite_type&&(R=(0,S.jsx)(w.Z,i()(i()({},P),{},{isRequired:!1,mediaType:o.composite_type,count:o.count,files:o.files,label:o.label||(0,x.ZP)("video.add_button_label",n.write_a_review),subfields:o.fields,values:l()(o),autoSubmit:!1,requiredText:e.requiredText,requiredErrorText:e.requiredErrorText}))),R}I.propTypes={className:p().string,localizations:p().object,starStyles:p().string,type:p().string,videoCollectionType:p().string,field:p().object,fieldIndex:p().number,handleFieldUpdate:p().func,prependID:p().bool,config:p().object,merchantProperties:p().object,minCharacters:p().number,requiredText:p().string,requiredErrorText:p().string,minRecommendedChars:p().number},I.defaultProps={prependID:!0},t.Z=I},25029:function(e,t,r){"use strict";r.d(t,{N:function(){return d},X:function(){return p}});var n=r(22882),i=r.n(n),o=r(63353),a=r.n(o),s=(r(2784),r(72779)),l=r.n(s),c=r(52322),u=["as","children","className"];function d(){return(0,c.jsx)("svg",{x:"0px",y:"0px",viewBox:"0 0 512 512",xmlSpace:"preserve","aria-hidden":"true",focusable:"false",className:"pr-form-control-error-icon",children:(0,c.jsx)("path",{d:"M507.333 424.604l-.01-.01C473.238 354.677 416.1 255.51 365.692 168.021c-26.376-45.792-51.294-89.031-69.305-121.896-8.5-15.521-23.605-24.792-40.398-24.792s-31.897 9.271-40.397 24.792c-18.022 32.885-42.95 76.167-69.357 121.99C95.858 255.583 38.741 354.708 4.667 424.604 1.573 430.969 0 437.708 0 444.615c0 25.396 20.511 46.052 45.731 46.052L256 490.646l210.269.021c25.22 0 45.731-20.656 45.731-46.052 0-6.907-1.573-13.646-4.667-20.011zM256 448.01c-11.76 0-21.333-9.573-21.333-21.333 0-11.76 9.573-21.333 21.333-21.333s21.333 9.573 21.333 21.333c0 11.76-9.573 21.333-21.333 21.333zm21.333-74.666a10.66 10.66 0 01-10.667 10.667h-21.333a10.66 10.66 0 01-10.667-10.667V138.677a10.66 10.66 0 0110.667-10.667h21.333a10.66 10.66 0 0110.667 10.667v234.667z"})})}function p(e){var t=e.as,r=void 0===t?"div":t,n=e.children,o=e.className,s=a()(e,u);return(0,c.jsx)(r,i()(i()({},s),{},{className:l()("pr-form-control-error-wrapper",o),children:n}))}},20400:function(e,t,r){"use strict";r.d(t,{X:function(){return u}});var n=r(22882),i=r.n(n),o=r(63353),a=r.n(o),s=r(2784),l=r(52322),c=["importance","shouldUseSpan","className"],u=s.forwardRef((function(e,t){var r=e.importance,n=e.shouldUseSpan,o=e.className,s=a()(e,c),u=r?" pr-h"+r:"";if(n)return(0,l.jsx)("span",i()(i()({className:""+(o||"")+u},s),{},{ref:t}));var d="h"+r;return(0,l.jsx)(d,i()(i()({className:o},s),{},{ref:t}))}));t.Z=u},3864:function(e,t,r){"use strict";var n=r(22882),i=r.n(n),o=r(57101),a=r.n(o),s=r(87480),l=r.n(s),c=r(22176),u=r.n(c),d=r(29406),p=r.n(d),f=r(2784),h=r(71376),m=r(3342),v=r(25029),g=r(59235),_=r(72779),y=r.n(_),w=r(27353),b=r(52322),x=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),o=0;o=2?e+"s":e},y=f.forwardRef((function(e,t){return(0,g.jsx)(w,u()(u()({},e),{},{forwardedRef:t}))})),w=function(e){function t(){for(var t,r,n=arguments.length,o=new Array(n),a=0;a0&&(s=window.getComputedStyle(document.getElementsByClassName("pr-star-mock")[0]).getPropertyValue("background-color")),a="-webkit-gradient(linear, left top, right top, color-stop("+o+"%, "+s+"), color-stop("+i%1*100+"%, #DDDDDD))"}t.push((0,g.jsx)(b,{starNumber:n,label:this.props.label,iconInputId:this.props.iconInputId,style:this.props.useQuarterStars?{background:a}:{},toggledClassName:this.props.toggledClassName,untoggledClassName:this.props.untoggledClassName,onMouseEnter:this.onMouseEnter.bind(this,n),onClickRating:this.onClickRating.bind(this,n),onIconKeyDown:this.onIconKeyDown.bind(this,n),toggled:r,customStarImageUrl:this.state.customStarUrl,customStarImageHoverUrl:this.state.customStarHoverUrl,isInteractive:this.props.isInteractive,isRequired:this.props.isRequired,isValid:this.props.isValid,"aria-describedby":this.props["aria-describedby"],imageAlt:this.props.imageAlt},n))}var l={};return l=this.props.isInteractive?{role:"radiogroup"}:{"aria-hidden":!0},(0,g.jsxs)("div",u()(u()({},l),{},{className:"pr-rating-stars",onMouseLeave:this.onMouseLeave.bind(this),children:[(0,g.jsx)("div",{className:"pr-star-mock pr-star-selected pr-hide"}),(0,g.jsx)("div",{className:"pr-custom-star-image"}),(0,g.jsx)("div",{className:"pr-custom-star-image-hover"}),t]}))},r.render=function(){return Number("4.0")>=4?this._renderStars():this._renderLegacyStars()},t}(f.Component);l()(x,"defaultProps",{isInteractive:!0,useQuarterStars:!1,isRequired:!1,isValid:!0,starStyles:"GOLD_NON_ACCESSIBILITY_COMPLIANT"}),t.Z=f.forwardRef((function(e,t){return(0,g.jsx)(x,u()(u()({},e),{},{forwardedRef:t}))}))},12871:function(e,t,r){"use strict";var n=r(87480),i=r.n(n),o=r(2784),a=r(52322),s=function(e){function t(){return e.apply(this,arguments)||this}i()(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(e){return e!==this.props},r.render=function(){return(0,a.jsx)("div",{className:this.props.isVisible?"pr-loading-indicator":"pr-loading-indicator pr-hide"})},t}(o.Component);t.Z=s},98743:function(e,t,r){"use strict";var n=r(57101),i=r.n(n),o=r(87480),a=r.n(o),s=r(22176),l=r.n(s),c=r(29406),u=r.n(c),d=r(2784),p=r(6080),f=r(52322),h=function(e){function t(){for(var t,r,n=arguments.length,o=new Array(n),a=0;a0?"pr-table pr-table-striped pr-media-table":"pr-hide pr-table pr-table-striped pr-media-table"),i=[],o=0;o0&&r[o]&&(!("boolean"==typeof r[o].isValid&&!r[o].isValid),r[o].error_message);var s=void 0;s=r&&r.length>0&&r[o].value?r[o].value.video_thumbnail_url:"";var c=r[o].value?r[o].value.video_url:"",u="video",d="pr-form-control form-control pr-textinput";r[o].value&&(r[o].value.isValid||(d+=" pr-invalid-field",u+=" pr-has-error")),i.push((0,w.jsxs)("tr",{className:"form-group pr-video-form-group",children:[(0,w.jsx)("td",{className:"pr-vertical-middle",width:"80px",children:(0,w.jsx)("span",{children:(0,w.jsx)(v.Z,{className:"pr-war-img-preview",ref:"img"+o,alt:(0,_.ZP)("cd.common.media.uploaded_media_item",this.props.localizations),src:s},a+s)})}),(0,w.jsx)("td",{className:"pr-vertical-middle",children:(0,w.jsx)("span",{className:u,children:(0,w.jsx)("input",{value:c,placeholder:(0,_.ZP)("video.placeholder",this.props.localizations.write_a_review),className:d,id:a,type:"text",ref:a,onChange:this._handleFileInputChange.bind(this,o)})})}),(0,w.jsx)("td",{className:"pr-vertical-middle",children:(0,w.jsx)("div",{className:"pr-btn pr-btn-danger pr-btn-delete pr-pull-right",onClick:this._handleRemoveFile.bind(this,o),tabIndex:"0",onKeyDown:this._deleteKeyDown.bind(this,o),children:(0,w.jsx)("div",{className:"pr-icon-delete",children:(0,w.jsx)(h.Z,{})})})})]},a))}return this.state.error_message&&(e=(0,w.jsx)("p",{className:"pr-text-danger",dangerouslySetInnerHTML:{__html:"  "+this.state.error_message.message}})),0===r.length&&(n+=" pr-hide"),(0,w.jsx)("div",{className:"pr-form-group form-group "+t+"-form-group",children:(0,w.jsx)("div",{ref:"fields",children:(0,w.jsxs)("div",{children:[e,(0,w.jsx)("table",{role:"presentation",className:n,children:(0,w.jsx)("tbody",{children:i})}),(0,w.jsx)("div",{className:"pr-war-media-input",children:(0,w.jsxs)("div",{className:"pr-file-input-btn-group"+(r.length'}})},t}(o.Component);t.Z=s},20638:function(e,t,r){"use strict";var n=r(22882),i=r.n(n),o=(r(2784),r(52322));t.Z=function(e){return(0,o.jsx)("svg",i()(i()({version:"1.1",viewBox:"0 0 432 432",xmlSpace:"preserve",focusable:"false"},e),{},{children:(0,o.jsxs)("g",{children:[(0,o.jsx)("circle",{fill:"#EAEAE9",cx:"216",cy:"216",r:"216"}),(0,o.jsx)("polygon",{fill:"#FFFFFF",points:"87.8,256.6 169.8,256.6 169.8,274 256.8,274 256.8,254.2 336.4,254.2 336.4,326.2 92.8,326.2 "}),(0,o.jsxs)("g",{children:[(0,o.jsx)("path",{fill:"#767676",d:"M350.2,243.4H249.6v22.4h-67.2v-22.4H81.8v89.4h268.4V243.4z M334,316.6H98v-57.2h68.4v22.4h99.4v-22.4 H334V316.6z"}),(0,o.jsx)("polygon",{fill:"#767676",points:"227.2,232.2 227.2,129 269.2,171 285,155.2 216.6,86.8 148.2,155.2 164,171 204.8,130.2 204.8,232.2 "})]})]})}))}},68503:function(e,t,r){"use strict";var n=r(87480),i=r.n(n),o=r(22176),a=r.n(o),s=r(2784),l=r(27353),c=r(38275),u=r(52322),d=function(e){function t(){return e.apply(this,arguments)||this}return i()(t,e),t.prototype.render=function(){var e=this.props,t=e.localizations,r=e.config,n=e.merchant,i=e.onSubmit,o=e.disabled,a="";"undefined"!=typeof window&&(a=(0,l.ZP)("legal",t.write_a_review||{legal:""}).replace(/\{0\}/g,r.merchant_name));var s=!!n.configuration&&n.configuration.services_must_agree_with_terms;return(0,u.jsx)(c.Z,{localizations:t,config:r,mustAcceptTerms:s,showLogo:!0,logoText:(0,l.ZP)("powerred_by",t.powerreviews||{powerred_by:""}),onClick:i,showLegal:!0,legalText:a,usePRFooterClass:!0,disabled:o,children:(0,l.ZP)("submit_review_button_label",t.write_a_review||{submit_review_button_label:""})})},t}(s.Component);a()(d,"defaultProps",{disabled:!1}),t.Z=d},77053:function(e,t,r){"use strict";var n=r(57101),i=r.n(n),o=r(87480),a=r.n(o),s=r(22176),l=r.n(s),c=r(29406),u=r.n(c),d=r(2784),p=r(82427),f=r(27353),h=r(64092),m=r(51519),v=r(30810),g=r(29700),_=r(74456),y=r(52322),w=function(e){function t(){for(var t,r,n=arguments.length,o=new Array(n),a=0;a0?null:(0,d.jsxs)("div",{className:"pr-war-mo-form pr-war-mo-form-empty",children:[(0,d.jsx)(l.X6,{importance:1,shouldUseSpan:(0,u.$)("DISABLE_CD4_HEADING_STRUCTURES",o.configuration,p),className:"pr-war-mo-form-title",children:(0,s.ZP)("media_only.headline",t.write_a_review)}),(0,d.jsx)("p",{className:"pr-war-mo-form-subtitle",children:(0,s.ZP)("media_only.subhead",t.write_a_review)}),(0,d.jsx)("div",{className:"pr-war-mo-form-share-media",children:(0,d.jsx)("img",{alt:"",src:a})}),(0,d.jsx)(c.Z,{localizations:t,id:"pr-war-mo-input",isRequired:!0,label:"",handleFieldUpdate:function(e){return r(null,e)},mediaType:"All",count:10,values:[],parentComponent:"WARMO",config:p,merchantProperties:o.configuration})]})},t}(o.Component);t.Z=p},80397:function(e,t,r){"use strict";var n=r(87480),i=r.n(n),o=r(90899),a=r.n(o),s=r(2784),l=r(27353),c=r(97769),u=r(62103),d=r(82427),p=r(30810),f=r(52322),h=function(e){function t(){return e.apply(this,arguments)||this}return i()(t,e),t.prototype.render=function(){var e=this.props,t=e.media,r=e.localizations,n=e.isReviewSubmitted,i=e.merchant_information,o=e.config,s=e.type,h=(0,p.v)(i.configuration,o).DISABLE_CD4_HEADING_STRUCTURES;return(0,f.jsxs)("div",{className:"pr-war-mo-form",children:[(0,f.jsx)(d.X6,{importance:1,shouldUseSpan:h,className:"pr-war-mo-form-title",children:(0,l.ZP)("media_only.thank_you_headline",r.write_a_review)}),(0,f.jsx)("p",{className:"pr-war-mo-form-subtitle",children:(0,l.ZP)("media_only.thank_you_subhead",r.write_a_review)}),(0,f.jsx)("div",{className:"pr-war-mo-form-thankyou-list",children:a()(t).call(t,(function(e,t){return(0,f.jsx)("div",{className:"pr-war-mo-form-thankyou-list-item",children:(0,f.jsx)("img",{width:"150",alt:e.caption||""+((0,l.ZP)("cd.common.media.uploaded_media_item",r)+t),src:(0,u.J)(e)})},e.id)}))}),(0,f.jsxs)("div",{className:"pr-war-mo-form-add-review",children:[!n&&(0,f.jsxs)("div",{children:[(0,f.jsx)(d.X6,{importance:1,shouldUseSpan:h,className:"pr-war-mo-form-title",children:(0,l.ZP)("media_only.add_review_headline",r.write_a_review)}),(0,f.jsx)("p",{className:"pr-war-mo-form-subtitle",children:(0,l.ZP)("media_only.add_review_subhead",r.write_a_review)})]}),(0,f.jsx)(c.Z,{config:o,type:s})]})]})},t}(s.Component);t.Z=h},71390:function(e,t,r){"use strict";var n=r(57101),i=r.n(n),o=r(87480),a=r.n(o),s=r(22176),l=r.n(s),c=r(29406),u=r.n(c),d=r(86166),p=r.n(d),f=r(23650),h=r.n(f),m=r(90899),v=r.n(m),g=r(71899),_=r.n(g),y=r(50381),w=r.n(y),b=r(2784),x=r(4792),E=r(70252),S=r(37389),C=r(33773),j=r(51370),I=r(51519),k=r(27353),N=r(80397),R=r(26183),P=r(83507),T=r(25857),A=r(30810),L=r(25380),O=r(74456),D=r(82427),M=r(52322),F=function(e){function t(){for(var t,r,n=arguments.length,o=new Array(n),a=0;a10)return setTimeout((function(){return alert((0,k.ZP)("media_only.upload_limit_warning",r.props.form_localizations.write_a_review))}));n=v()(n).call(n,(function(e){var t,r=e.id?e.file.file:e,n=_()(t=r.type).call(t,"video")>-1?C.pX:C.k4,i={id:r.lastModified+"-"+(r.size||r.name)+"-"+Date.now(),file:r,type:n};return e.caption&&(i.caption=e.caption),i})),r.props.addMedia(r.props.config,n)})),l()(i()(r),"removeMedia",(function(e){var t=r.props,n=t.config,i=t.media;r.props.removeMedia(n,e),(0,S.$s)(i[e].meta.composite_data.raw)})),l()(i()(r),"updateCaption",(function(e,t){r.props.updateMediaCaption(r.props.config,e,t.currentTarget.value,C.k4)})),l()(i()(r),"rotateMedia",(function(e){r.props.rotateMedia(r.props.config,e)})),l()(i()(r),"handleSubmit",(function(){if(!r.props.isSubmitting){var e=window.ioGetBlackbox?window.ioGetBlackbox().blackbox:null;e||!r.props.iovationRequired?r.props.submitMediaOnly(r.props.config,r.props.media,r.props.feedlessProductInfo,r.props.contextInformation,e,r.tracker.getUserId()):r.props.setMessage(r.props.config,(0,k.ZP)("error.adblock_interference",r.props.form_localizations.write_a_review))}})),r}a()(t,e);var r=t.prototype;return r.componentDidMount=function(){this.props.getTemplate(this.props.config),this.sendBeacon(L.GM.WARMO.start)},r.componentDidUpdate=function(e){var t,r;(this.props.message&&document.getElementById("pr-war-mo-focus-target")&&document.getElementById("pr-war-mo-focus-target").focus(),0===e.media.length&&this.props.media.length>0&&this.sendBeacon(L.GM.WARMO.caption),e.merchant!==this.props.merchant)&&this.tracker.setMode(null===(t=this.props.merchant)||void 0===t||null===(r=t.configuration)||void 0===r?void 0:r.social_measurement_data);e.isComplete!==this.props.isComplete&&!0===this.props.isComplete&&this.sendBeacon(L.GM.WARMO.complete)},r.render=function(){var e,t=this.props,r=t.productInformation,n=t.merchant,i=t.config,o=t.isLoading,a=t.form_localizations;return o&&!r?null:(0,M.jsxs)("section",{className:"p-w-r pr-war-mo","data-testid":"media-only-form",children:[null!=r&&r.name?(0,M.jsx)("header",{className:"pr-war-mo-header",children:(0,M.jsxs)("div",{className:"pr-war-mo-header-inner",children:[(0,M.jsx)(O.q,{className:"pr-war-mo-header-inner-product-img",src:I.Cu(r),alt:(0,k.ZP)("cd.common.media.product_image",a),errorAlt:(0,k.ZP)("cd.common.media.product_image.unavailable",a)}),(0,M.jsx)(D.X6,{importance:1,shouldUseSpan:(0,A.$)("DISABLE_CD4_HEADING_STRUCTURES",n.configuration,i),className:"pr-war-mo-header-inner-product-name",children:r.name})]})}):(0,M.jsx)("div",{className:"pr-war-mo-header-empty"}),!this.props.isComplete&&this.props.message&&(0,M.jsx)("div",{tabIndex:"-1",className:"pr-accessible-focus-element",id:"pr-war-mo-focus-target","aria-hidden":"true",children:(0,M.jsx)(j.Z,{isVisible:!0,message:this.props.message})}),(0,M.jsx)(R.Z,{addMedia:this.addMedia,isComplete:this.props.isComplete,media:this.props.media,localizations:this.props.form_localizations,merchant_information:n,config:i}),(0,M.jsx)(P.Z,{isComplete:this.props.isComplete,media:this.props.media,merchant_information:n,localizations:this.props.form_localizations,removeMedia:this.removeMedia,rotateMedia:this.rotateMedia,updateCaption:this.updateCaption,isLoading:this.props.isLoading,addMedia:this.addMedia,config:this.props.config,onSubmit:this.handleSubmit,disabled:this.props.isSubmitting||w()(e=this.props.media).call(e,(function(e){return!e.isUploaded})).length>0}),this.props.isComplete&&(0,M.jsx)(N.Z,{config:this.props.config,merchant_information:n,type:this.props.type,media:this.props.media,isReviewSubmitted:this.props.isReviewSubmitted,localizations:this.props.form_localizations})]})},t}(b.Component);l()(F,"defaultProps",{media:[],merchant:{}});var z={getTemplate:E.t4,addMedia:E.rA,removeMedia:E.TU,updateMediaCaption:E.N5,rotateMedia:E.YP,submitMediaOnly:E.A6,setMessage:E.PJ};t.Z=(0,x.$j)((function(e,t){var r=e.WriteAReview[I.iC(t.config)];return r?{isSubmitting:r.isSubmitting,isLoading:r.isLoading,media:r.media,contextInformation:r.context_information,productInformation:r.product_information,feedlessProductInfo:r.feedlessProductInfo,isComplete:r.isComplete,isReviewSubmitted:r.isReviewSubmitted,form_localizations:r.form_localizations,merchant:r.merchant_information,message:r.message}:{}}),z)((0,T.r)(F))},62103:function(e,t,r){"use strict";r.d(t,{J:function(){return n}});var n=function(e){var t=e.rotation,r=void 0===t?0:t,n=e.meta,i=(n=void 0===n?{}:n).composite_data,o=(i=void 0===i?{}:i).raw,a=(o=void 0===o?{}:o).url;return(void 0===a?"":a).replace("upload/","upload/f_auto,w_150,h_150,q_90,c_pad,a_"+r+"/")}},12751:function(e,t,r){"use strict";r.d(t,{P:function(){return s}});r(2784);var n=r(27353),i=r(51520),o=r(47589),a=r(52322);function s(e){var t=e.localizations,r=e.onClick,s=e.status;return(0,a.jsx)("div",{"aria-live":"polite",children:(0,a.jsx)("div",{className:"pr-rating-only_status",children:"success"===s?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.Z,{className:"pr-rating-only_status_icon",fillColor:"#1e9454"}),(0,a.jsx)("span",{className:"pr-rating-only_status_message pr-rating-only_status_message--success",children:(0,n.ZP)("rating_only.status.rating_submitted",t.write_a_review)})]}):"error"===s?(0,a.jsxs)("span",{className:"pr-rating-only_status_message",children:[(0,n.ZP)("rating_only.status.try_again",t.write_a_review),(0,a.jsx)("button",{onClick:r,className:"pr-rating-only_status_message_button",children:(0,n.ZP)("rating_only.status.button.try_again",t.write_a_review)})]}):"pending"===s?(0,a.jsx)(i.v,{delay:1e3,children:(0,a.jsx)("span",{className:"pr-rating-only_status_message",children:(0,n.ZP)("rating_only.status.pending",t.write_a_review)})}):void 0})})}},50157:function(e,t,r){"use strict";var n=r(57101),i=r.n(n),o=r(87480),a=r.n(o),s=r(22176),l=r.n(s),c=r(29406),u=r.n(c),d=r(50381),p=r.n(d),f=r(71899),h=r.n(f),m=r(2784),v=r(82427),g=r(51519),_=r(30810),y=r(27353),w=r(52322),b=function(e){function t(){for(var t,r,n=arguments.length,o=new Array(n),a=0;a0&&(0,w.jsxs)("section",{className:"pr-social-sharing",children:[(0,w.jsx)("div",{className:"pr-social-sharing-left",children:(0,w.jsx)("img",{width:"100",src:g.Cu(this.props.product),alt:this.props.product.name||(0,y.ZP)("cd.common.media.product_image",this.props.localizations)})}),(0,w.jsxs)("div",{className:"pr-social-sharing-right",children:[(0,w.jsx)(v.X6,{importance:1,shouldUseSpan:(0,_.$)("DISABLE_CD4_HEADING_STRUCTURES",this.props.merchantProperties,this.props.config),children:"Share your experience"}),(0,w.jsx)("p",{children:"Your opinion matters! Share your experience with your social networks."}),(0,w.jsx)("div",{className:"pr-share-btns",children:n})]})]})})},t}(m.Component);t.Z=b},31781:function(e,t,r){"use strict";r.d(t,{Z:function(){return F}});var n=r(22882),i=r.n(n),o=r(57101),a=r.n(o),s=r(87480),l=r.n(s),c=r(22176),u=r.n(c),d=r(29406),p=r.n(d),f=r(90899),h=r.n(f),m=r(50381),v=r.n(m),g=r(86166),_=r.n(g),y=r(42461),w=r.n(y),b=r(11052),x=r.n(b),E=r(2784),S=r(51519),C=r(71376),j=r(27353),I=r(46711),k=r(5751),N=r(82427),R=r(50157),P=r(30810),T=r(59235),A=r(84272),L=r(77195),O=r(13662),D=r(52322),M=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),o=0;o0){for(var M=0;M0&&(I=(0,D.jsxs)("p",{className:"pr-text",children:[(0,D.jsx)("b",{className:"pr-dark",dangerouslySetInnerHTML:{__html:c.label+": "}}),(0,D.jsx)("span",{dangerouslySetInnerHTML:{__html:_()(c).join(", ")}})]})),_()(u).length>0&&(k=(0,D.jsxs)("p",{className:"pr-text",children:[(0,D.jsx)("b",{className:"pr-dark",dangerouslySetInnerHTML:{__html:u.label+": "}}),(0,D.jsx)("span",{dangerouslySetInnerHTML:{__html:_()(u).join(", ")}})]}));for(var F=[],z=0;z=n.war_minimum_required_characters),t}));r.props.updateFields(r.props.config,o)})),u()(a()(r),"waitForIovationAndSubmit",(function(){window.ioGetBlackbox||0===r.interval?(r.intervalID&&window.clearInterval(r.intervalID),r.handleSubmit()):r.interval=r.interval-1})),u()(a()(r),"handleSubmit",(function(){r.updateFieldValidity(r.props.fields),setTimeout((function(){var e,t=r.props,n=t.config,i=t.feedlessProductInfo,o=t.contextInformation,a=t.submitWAR,s=t.cancelSubmit,l=t.fields,c=t.isMediaOnlyFollowUp,u=t.localizations;if(!!l.some((function(e){return!e.isValid})))return s(n),void r.setState({preSubmitErrorList:h()(e=_()(l).call(l,(function(e){return!e.isValid&&e.required}))).call(e,(function(e){return{label:e.label,id:(0,B.W)(e.key,!0)}}))});r.setState({preSubmitErrorList:[]});var d=_()(l).call(l,(function(e){return e.value||v()(e)&&Array.isArray(v()(e))&&v()(e).length})),p=window.ioGetBlackbox?window.ioGetBlackbox().blackbox:null;if(!p&&r.props.iovationRequired)return r.props.setSubmitErrorMessage(n,(0,k.ZP)("error.adblock_interference",u.powerreviews));document.getElementById("pr-war")&&document.getElementById("pr-war").scrollIntoView(),a(n,d,i,o,p,c,r.tracker.getUserId()).then((function(){r.props.submitError&&R.Kn(N.Z.SUBMISSION_ERROR,{fields:r.props.fields,error:{hasError:r.props.submitError,message:r.props.submitErrorMessage}}),r.props.isReviewSubmitted&&R.Kn(N.Z.COMPLETE,{fields:r.props.fields,error:{hasError:r.props.submitError,message:r.props.submitErrorMessage}})}))}))})),u()(a()(r),"handleFieldChange",(function(e,t){var n,o=p()(n=[]).call(n,r.props.fields);o[t]=i()(i()({},o[t]),e),r.props.updateFields(r.props.config,o)})),r}l()(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this,t=this.props,r=t.getWARTemplate,n=t.config;t.isMediaOnlyFollowUp||r(n).then((function(){e.props.fetchError||(window.POWERREVIEWS.submission=window.POWERREVIEWS.submission||{},window.POWERREVIEWS.submission.set=e.setField,e.onLoadSuccess()),R.Kn(N.Z.LOADED),n.on_render&&T.Z.onWriteComponentRender(L.ZP.WriteAReview,e.props)}))},r.componentDidUpdate=function(e,t){var r=this.props,n=r.fetchError,i=r.submitError,o=this.state.preSubmitErrorList.length>0&&this.state.preSubmitErrorList!==t.preSubmitErrorList;if(!e.fetchError&&n||!e.submitError&&i||o){var a=this.errorAlert.current;a&&a.scrollIntoView&&(R.UB()?a.scrollIntoView():a.scrollIntoView({block:"end",behavior:"smooth"}),document.body.scrollTop-=170)}if(!e.merchant&&this.props.merchant&&this.tracker.setMode(this.props.merchant.configuration.social_measurement_data),e.isReviewSubmitted!==this.props.isReviewSubmitted&&!0===this.props.isReviewSubmitted){var s=this.props,l=s.type,c=s.config.source;this.sendBeacon({eventFlow:"sms"===c?O.ZP[l].smsComplete:O.ZP[l].complete})}},r.componentWillUnmount=function(){this.intervalID&&window.clearInterval(this.intervalID)},r.renderThankYouPage=function(e,t){var r=this.props,n=r.type,i=r.config,o=r.merchant,a=void 0===o?{}:o,s=r.product,l=void 0===s?{}:s,c=r.contextInformation,u=void 0===c?{}:c,d=r.localizations,p=void 0===d?{}:d,f=r.fields,h=void 0===f?[]:f;return(0,K.jsxs)("div",{className:e,children:[(0,K.jsx)("div",{}),(0,K.jsx)(C.Z,{id:"thanks-iframe",type:n,frameBorder:"0",fields:h,config:i,merchant:a,product:l,social:a.configuration,contextInfo:u,promo:a.promo_markup,starStyles:t,localizations:p,merchantProperties:a.configuration,sendBeacon:this.sendBeacon})]},"pr-thank-you-page")},r.render=function(){var e,t=this,r=this.props,n=r.config,o=r.merchant,a=void 0===o?{}:o,s=r.product,l=void 0===s?{}:s,c=r.localizations,u=void 0===c?{}:c,d=r.isLoading,p=r.isSubmitting,f=r.isReviewSubmitted,m=r.type,v=r.fetchError,g=r.fetchErrorType,y=r.fetchErrorMessage,b=r.submitError,x=r.submitErrorType,C=r.submitErrorMessage,N=r.fields,T=void 0===N?[]:N,L=r.isMediaOnlyFollowUp,O=this.state.preSubmitErrorList,F="";(0,P.$)("pr_star_styles")?F=(0,P.$)("pr_star_styles"):a.configuration&&a.configuration.star_styles&&(F=a.configuration.star_styles);var z=(null==a||null===(e=a.configuration)||void 0===e?void 0:e.enable_rating_only_collection)&&!0!==(0,P.$)("pr_full_review_collection",n),W=n.ugc_id&&n.passcode,Z=v||b||O.length>0,H=a.configuration&&!a.configuration.is_live&&!d&&!p,G=!!_()(T).call(T,(function(e){return"IN_PROGRESS"===e.syncStatus})).length,Q=d||p,Y=Q||v,$=U()("p-w-r",{"pr-ie8":R.UB(),"pr-rating-only":z});if($+=n.page_id?" pr-page-id-"+n.page_id.toString().replace(/[^\w\s]/gi,""):"",$+=n.merchant_id?" pr-merchant-id-"+this.props.config.merchant_id:"",$+=n.merchant_group_id?" pr-merchant-group-"+this.props.config.merchant_group_id:"",g===A.Z.FATAL_ERROR||g===A.Z.DUPLICATE_REVIEW||g===A.Z.INVALID_PARAMETER||x===A.Z.FATAL_SUBMIT_REVIEW_FAILURE){var X,J,ee,te=g===A.Z.DUPLICATE_REVIEW?"info":"danger",re="We're sorry, the Write a Review service is temporarily unavailable. Please try again later.";if(n.locale)-1!==w()(X=n.locale).call(X,"de_")?re="Es tut uns leid, dass der Review-Service vorübergehend nicht verfügbar ist. Bitte versuchen Sie es später noch einmal.":-1!==w()(J=n.locale).call(J,"fr_")?re="Nous sommes désolés, le service Rédiger un commentaire est momentanément indisponible. Veuillez réessayer plus tard.":-1!==w()(ee=n.locale).call(ee,"pt_")&&(re="Lamentamos, mas o serviço Write a Review está temporariamente indisponível. Por favor, tente novamente mais tarde.");return(0,K.jsx)("div",{className:$+" pr-template-load-alert",children:(0,K.jsx)(I.Z,{message:y||C||re,type:te,isVisible:Z})})}if(f)return this.renderThankYouPage($,F);var ne=null;if(O.length){var ie=1===O.length?(0,k.ZP)("error_alert.heading_singular",u.write_a_review):(0,k.ZP)("error_alert.heading_plural",u.write_a_review).replace("{}",O.length),oe=(0,k.ZP)("error_alert.required_field",u.write_a_review);ne=(0,K.jsxs)("div",{children:[(0,K.jsx)(M.y5,{children:(0,K.jsx)(M.X6,{importance:2,className:"pr-alert_heading",children:ie})}),(0,K.jsx)("ul",{className:"pr-alert_list",children:h()(O).call(O,(function(e){var t=e.label,r=e.id,n=oe.replace("{}",t);return(0,K.jsx)("li",{children:n},r)}))})]})}var ae,se=(0,k.ZP)("write_a_review.required_label",u.write_a_review),le=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(I.Z,{message:y||C||ne,type:"danger",isVisible:Z,ref:this.errorAlert}),W&&!Q&&(0,K.jsx)(I.Z,{message:"

"+(0,k.ZP)("review_editing.notification_title",u.write_a_review)+'

'+(0,k.ZP)("review_editing.notification_description",u.write_a_review)+"

",type:"warning",isVisible:!0,isWarning:!0}),(0,K.jsx)(I.Z,{message:"This is a TEST review",type:"warning",isVisible:H,isWarning:!0})]}),ce=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)("div",{id:"pr-war-form",children:[(0,K.jsxs)("p",{className:"pr-header-required",tabIndex:"0",children:[(0,K.jsx)("abbr",{className:"pr-required-indicator",title:se,children:"*"}),(0,K.jsx)("span",{children:(0,k.ZP)("page_header.required_text",u.write_a_review||{"page_header.required_text":""})})]}),h()(T).call(T,(function(e,r){var o=(0,P.$)("WAR_MINIMUM_RECOMMENDED_CHARACTERS"),s={field:e,fieldIndex:r,handleFieldUpdate:t.handleFieldChange,type:m,starStyles:F,localizations:u,config:n,merchantProperties:a.configuration,videoCollectionType:(0,P.$)("pr_video_collection_type",a.configuration,n)};return"comments"===e.key&&(a.configuration&&a.configuration.war_minimum_required_characters&&"number"==typeof a.configuration.war_minimum_required_characters?s.minCharacters=a.configuration.war_minimum_required_characters:o?s.minRecommendedChars=o:a.configuration&&a.configuration.war_minimum_recommended_characters&&(s.minRecommendedChars=a.configuration.war_minimum_recommended_characters)),z&&"rating"===e.key?(ae=(0,K.jsx)(q.Z,{id:"pr-"+e.key,requiredText:se,onChange:t.onRatingChange,handleFieldUpdate:t.handleFieldChange,starStyles:F,fieldIndex:r,preset:e.value,statusMessage:(0,K.jsx)(V.P,{onClick:function(){return t.onRatingChange(t.state.ratingSelected)},localizations:u,status:t.state.ratingOnlyStatus})}),null):(0,K.jsx)(B.Z,i()({requiredText:se},s),e.id||e.key)}))]}),(0,K.jsx)(S.Z,{localizations:u,onSubmit:this.handleSubmit,merchant:a,config:n,disabled:G})]});return(0,K.jsxs)("div",{className:$,children:[a.configuration&&a.configuration.enable_enhanced_content_security&&(0,K.jsx)(D.Z,{clipUrlParams:["pr_style_sheet"]}),(0,K.jsx)("div",{}),(0,K.jsx)(j.Z,{isVisible:Q}),z?(0,K.jsxs)("div",{role:"form",className:"pr-war"+(Y?" pr-hide":""),"data-testid":"war-form",children:[!L&&(0,K.jsx)(E.Z,{localizations:u,config:n,product:l,merchant:a}),(0,K.jsx)(M.y5,{children:(0,K.jsx)(M.X6,{importance:2,className:"pr-rating-only_heading",children:(0,k.ZP)("rating_only.heading.rate_item",u.write_a_review)})}),ae,"success"===this.state.ratingOnlyStatus&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(M.y5,{children:(0,K.jsx)(M.X6,{importance:2,className:"pr-rating-only_heading",children:(0,k.ZP)("rating_only.heading.write_review",u.write_a_review)})}),le,ce]})]}):(0,K.jsxs)(K.Fragment,{children:[le,(0,K.jsxs)("div",{role:"form",className:"pr-war"+(Y?" pr-hide":""),"data-testid":"war-form",children:[!L&&(0,K.jsx)(E.Z,{localizations:u,config:n,product:l,merchant:a}),ce]})]})]})},t}(b.Component),Q={getWARTemplate:Z.qb,submitWAR:Z.IK,updateFields:Z.DV,setSubmitErrorMessage:Z.Qw,cancelSubmit:Z.tZ};t.Z=(0,x.$j)((function(e,t){var r=R.iC(t.config),n=e.WriteAReview[r];return i()(i()({},n),{},{isMediaOnlyFollowUp:"WARMO"===t.type})}),Q)((0,H.r)(G))},68291:function(e,t,r){"use strict";var n=r(87480),i=r.n(n),o=r(2784),a=r(97769),s=r(71390),l=r(16679),c=r(51519),u=r(30810),d=r(52322),p=function(e){function t(t){var r,n;return(n=e.call(this,t)||this)._useMediaOnly=(r=n)._useMediaOnly.bind(r),n}i()(t,e);var r=t.prototype;return r._useMediaOnly=function(){var e=(0,u.v)(this.props.config),t=e.EMUID,r=e.MERCHANT_USER_ID;return"mo"===e.WAR_VARIANT&&(t||r&&c.K0(r,!0))},r.render=function(){return this._useMediaOnly()?(0,d.jsx)(s.Z,{config:this.props.config,type:l.ZP.WARMO}):(0,d.jsx)(a.Z,{config:this.props.config,type:l.ZP.WAR})},t}(o.Component);t.Z=p},5979:function(e,t,r){"use strict";r.d(t,{R:function(){return _}});var n=r(63353),i=r.n(n),o=r(8005),a=r.n(o),s=r(2784),l=r(95147),c=r(25029),u=r(51519),d=r(59235),p=r(72779),f=r.n(p),h=r(3342),m=r(27353),v=r(52322),g=["id"],_=function(e){var t=e.isValid,r=e.id,n=e.label,o=e.helperText,a=e.error,p=e.rows,_=e.preset,b=e.placeholder,x=e.isRequired,E=e.showLabel,S=e.reactKey,C=e.fieldIndex,j=e.minRecommendedChars,I=e.localizations,k=f()("pr-form-group form-group",r+"-form-group",{"pr-has-error":!t,"no-label":!E}),N=f()("pr-form-control form-control pr-textarea",{"pr-invalid-field":!t}),R=h.Z.getRequiredIndicator(e),P=s.useState(""),T=P[0],A=P[1],L=T.length/j,O=(0,m.ZP)("min_recommended_chars.recommendation",I.write_a_review).replace("{0}",j);T.length0?O=(0,m.ZP)("min_recommended_chars.characters_left",I.write_a_review).replace("{0}",j-T.length):T.length>=j&&(O=(0,m.ZP)("min_recommended_chars.recommendation_met",I.write_a_review));var D=y(L,I,j),M=(0,d.D9)(D);(0,s.useEffect)((function(){M!==D&&(0,d.ub)(D)}),[M,D]);var F=function(e){var t=e.currentTarget.value;A(t),z(C,t)},z=function(t,r){var n={id:t,value:r,isValid:u.K0(r,e.isRequired,e.validationType)};if(e.handleFieldUpdate){var o=i()(n,g);e.handleFieldUpdate(o,t)}};return(0,v.jsx)(l.k,{valid:t,helperText:o,fieldError:w(25,a),children:function(e){var i=e.helperText,o=e.fieldError,a=e.describedBy;return(0,v.jsxs)("div",{className:k,children:[(0,v.jsxs)("label",{className:"pr-control-label",htmlFor:r+"-input",children:[(0,v.jsx)("span",{dangerouslySetInnerHTML:{__html:n}}),R]}),t?i:o,(0,v.jsxs)(c.X,{children:[(0,v.jsx)("textarea",{id:r+"-input",className:N,rows:p,defaultValue:_,onChange:F,placeholder:b,required:!!x||void 0,"aria-invalid":!t||void 0,"aria-describedby":a},S||!1),t?null:(0,v.jsx)(c.N,{})]}),(0,v.jsx)("div",{className:f()("pr-review-meter",{"pr-review-meter-animation":L>=1}),style:{width:L<=1?100*L+"%":"100%",display:L>0?"block":"none"}}),(0,v.jsx)("div",{className:"pr-review-meter-text",children:O})]})}})},y=function(e,t,r){var n;return 0===e?n=(0,m.ZP)("min_recommended_chars.recommendation",t.write_a_review).replace("{0}",r):e>=1?n=(0,m.ZP)("min_recommended_chars.aria_status_recommendation_met",t.write_a_review)+" "+(0,m.ZP)("min_recommended_chars.recommendation_met",t.write_a_review):e>=.75?n=(0,m.ZP)("min_recommended_chars.aria_status",t.write_a_reviews).replace("{0}",75)+" "+(0,m.ZP)("min_recommended_chars.characters_left",t.write_a_review).replace("{0}",Math.round(r-.75*r)):e>=.5?n=(0,m.ZP)("min_recommended_chars.aria_status",t.write_a_review).replace("{0}",50)+" "+(0,m.ZP)("min_recommended_chars.characters_left",t.write_a_reviews).replace("{0}",Math.round(r-.5*r)):e>=.25&&(n=(0,m.ZP)("min_recommended_chars.aria_status",t.write_a_review).replace("{0}",25)+" "+(0,m.ZP)("min_recommended_chars.characters_left",t.write_a_review).replace("{0}",Math.round(r-.25*r))),n},w=function(e,t){var r="";if(t)if(t.detail.profanity){var n,i="";t.detail.profanity.forEach((function(e){i+=e,i+=", "})),r=a()(n=t.message).call(n,0,-1)+" : "+a()(i).call(i,0,-2)+"."}else t.detail.invalid&&(r=t.detail.invalid);var o=f()("pr-field-alert pr-text-danger pr-field-alert-profanity",{"pr-hide":!t});return(0,v.jsx)("p",{className:o,children:r})};_.defaultProps={preset:null,isValid:!0,isRequired:!1,isVisible:!0,showLabel:!0,maxCharacters:2e3,rows:5}},39476:function(e,t,r){"use strict";r.d(t,{p:function(){return v}});var n=r(23972),i=r.n(n),o=r(2784),a=r(51519),s=r(64092),l=r(82427),c=r(30810),u=r(27353),d=r(62173),p=r(15608),f=r(38275),h=r(76808),m=r(52322),v=function(e){var t=e.config,r=e.merchantProperties,n=e.copyError,i=e.links,v=e.retailer,_=e.localizations,y=e.product,w=e.reviewText,b=e.reviewRating,x=e.sendBeacon,E=e.tooltipLocalizations,S=(0,c.v)(r,t).DISABLE_CD4_HEADING_STRUCTURES,C=(0,a.Cu)(y),j=(0,o.useState)(!1),I=j[0],k=j[1],N=(0,o.useState)(!1),R=N[0],P=N[1],T=(0,o.useState)(n||!1),A=T[0],L=T[1],O=(0,o.useState)(!1),D=O[0],M=O[1],F=Array.isArray(i)&&i.length>0,z=function(){F&&x(h.WAR.share_to_retailer_clicked(g(i[0],v)))},V=function(){P(!0),"Amazon"===v?setTimeout((function(){return window.open(i[0]+":"+b)}),3e3):setTimeout((function(){return window.open(""+i[0])}),3e3)},q=function(){k(!0),setTimeout(V,1e3)};return(0,o.useEffect)((function(){F&&x(h.WAR.share_to_retailer_present(g(i[0],v)))}),[F,i,v,x]),F?(0,m.jsxs)("div",{className:"pr-retail-share pr-callout"+(n?" pr-retail-share-fallback":"")+(R?" pr-retail-share-redirect":""),children:[(0,m.jsx)("div",{className:"pr-retail-share-header-image",children:(0,m.jsx)(s.Z,{src:C,alt:y.name})}),(0,m.jsxs)("div",{className:"pr-retail-share-header-text",children:[(0,m.jsx)(l.X6,{className:"pr-retail-share-header",importance:1,shouldUseSpan:S,children:(0,u.ZP)("write_a_review.share_to_retailer.header",_).replace("{0}",v)}),(0,m.jsx)("p",{className:"pr-retail-share-subheader",children:(0,u.ZP)("write_a_review.share_to_retailer.subheader",_)}),n?(0,m.jsxs)("div",{className:"pr-retail-share-fallback",children:[(0,m.jsxs)("div",{className:"pr-retail-share-fallback-buttons",children:[(0,m.jsx)(d.Z,{className:"pr-btn-copy-fallback",copyText:w,onCopy:q,localizations:E,targetId:"#pr-retail-share-copy-fallback",onClick:function(){z(),D||M(!0)},children:(0,u.ZP)("write_a_review.share_to_retailer.fallback.copy_button",_)}),(0,m.jsx)("span",{children:(0,u.ZP)("write_a_review.share_to_retailer.fallback.italic_text",_)}),(0,m.jsx)(f.Z,{onClick:q,className:"pr-btn pr-btn-default pr-btn-review "+(D?"":"pr-btn-amzn-uncopied"),children:(0,u.ZP)("write_a_review.share_to_retailer.fallback.share_button",_).replace("{0}",v)})]}),(0,m.jsx)(p.Z,{id:"pr-retail-share-copy-fallback",ref:"fallback",value:w})]}):R?(0,m.jsxs)("div",{className:"pr-redirect-message",children:[(0,m.jsxs)(l.X6,{className:"pr-redirect-message-header",importance:2,shouldUseSpan:S,children:[(0,u.ZP)("write_a_review.share_to_retailer.normal.redirect_message",_).replace("{0}",v),(0,m.jsx)("span",{className:"pr-elipsis--loading"})]}),(0,m.jsx)("a",{href:""+i[0],target:"_blank",rel:"noopener noreferrer",children:(0,u.ZP)("write_a_review.share_to_retailer.normal.click_to_redirect",_)})]}):(0,m.jsx)(d.Z,{disabled:I,onClick:z,className:I?"pr-accessible-btn pr-accessible-btn--copied":"pr-accessible-btn",copyText:w,onCopy:q,onError:function(){A||L(!0)},localizations:E,children:I&&!R?(0,u.ZP)("write_a_review.share_to_retailer.tooltip.success",_):(0,u.ZP)("write_a_review.share_to_retailer.normal.button",_).replace("{0}",v)})]})]}):null};function g(e,t){return"Amazon"===t?new(i())(e).hostname.replace(/\./g,"_"):t.toLowerCase().replace(/ /g,"_")}},77195:function(e,t,r){"use strict";r.d(t,{X:function(){return f}});var n=r(22882),i=r.n(n),o=r(90899),a=r.n(o),s=r(42461),l=r.n(s),c=r(29406),u=r.n(c),d=(r(2784),r(39476)),p=r(52322),f=function(e){var t,r=e.shareToRetailerData;if(!r)return null;var n=a()(t=l()(r)).call(t,(function(t){var n,o;switch(t){case"share_to_bestbuy_link":o="Best Buy";break;case"share_to_coolblue_link":o="Coolblue";break;default:o="Amazon"}return(0,p.jsx)(d.p,i()({retailer:o,links:u()(n=[]).call(n,r[t])},e),t)}));return(0,p.jsx)(p.Fragment,{children:n})}},13662:function(e,t,r){"use strict";r.d(t,{z:function(){return y}});var n=r(90899),i=r.n(n),o=r(23972),a=r.n(o),s=r(2784),l=r(82427),c=r(27353),u=r(72779),d=r.n(u),p=r(62173),f=r(15608),h=r(76808),m=r(91034),v=r(30810),g=r(52322),_="ontouchstart"in window||Boolean(navigator.msMaxTouchPoints),y=function(e){var t,r,n=e.localizations,i=e.merchantProperties,o=e.reviewRating,u=e.reviewText,y=e.sendBeacon,x=e.shareToRetailerData,E=e.tooltipLocalizations,S=(0,s.useState)(!1),C=S[0],j=S[1],I=(0,s.useState)(!1),k=I[0],N=I[1],R=(0,s.useState)(!1),P=R[0],T=R[1],A=(0,s.useState)(!1),L=A[0],O=A[1],D=(0,s.useState)(!1),M=D[0],F=D[1],z=(0,m.e4)()<500,V=function(e){return(0,c.ZP)("share_to_retailer."+e,n.write_a_review)||(0,c.ZP)("write_a_review.share_to_retailer."+e,n)};(0,v.$)("pr_asin")?(r=x.share_to_amazon_links[0]+":"+o,t="Amazon"):(0,v.$)("pr_bestbuy_sku")?(r=x.share_to_bestbuy_link,t="Best Buy"):(0,v.$)("pr_coolblue_sku")?(r=x.share_to_coolblue_link,t="Coolblue"):!0===i.enable_share_to_amazon?(r=x.share_to_amazon_links[0]+":"+o,t="Amazon"):!0===i.enable_share_to_bestbuy?(r=x.share_to_bestbuy_link,t="Best Buy"):!0===i.enable_share_to_coolblue&&(r=x.share_to_coolblue_link,t="Coolblue");var q=function(e,t){if("Amazon"===t)return new(a())(e).hostname.replace(/\./g,"_");return t.toLowerCase().replace(/ /g,"_")}(r,t);!M&&q&&(y(h.WAR.share_to_retailer_present(q)),F(!0));var W=function(){N(!0),setTimeout((function(){return window.open(r)}),3e3)},U=function(){j(!0),setTimeout(W,2500)},Z=d()("pr-retail-share-focus pr-callout",{"pr-retail-share-fallback":P,"pr-retail-share-focus-notification-visible":C}),B=d()("pr-retail-share-focus pr-callout",{"pr-retail-share-focus-redirect":!z});return k?k?(0,g.jsx)("div",{className:d()("pr-retail-share-focus-container",{"pr-war-phone":z,"pr-war-tablet":!z}),children:(0,g.jsx)("div",{className:B,children:(0,g.jsxs)("div",{className:"pr-retail-share-focus-header-text",children:[(0,g.jsx)(l.X6,{className:"pr-retail-share-focus-header",importance:1,children:V("focus.redirect_header").replace("{0}",t)}),(0,g.jsx)(w,{}),(0,g.jsx)(b,{steps:[V("focus.share_step1").replace("{0}",t),V(_?"focus.share_step2_touch_device":"focus.share_step2"),V("focus.share_step3")]}),(0,g.jsx)("div",{className:"pr-retail-share-focus-redirect-link",children:(0,g.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:V("normal.click_to_redirect")})})]})})}):void 0:(0,g.jsx)("div",{className:"pr-retail-share-focus-container",children:(0,g.jsxs)("div",{className:Z,children:[(0,g.jsx)("div",{className:"pr-retail-share-focus_notification",role:"alert",style:{visibility:C?"visible":"hidden"},children:V("focus.copy_success")}),(0,g.jsxs)("div",{className:"pr-retail-share-focus-header-text",children:[(0,g.jsx)(l.X6,{className:"pr-retail-share-focus-header",importance:1,children:V("focus.header").replace("{0}",t)}),(0,g.jsx)("p",{children:V("focus.subheader")}),(0,g.jsx)("p",{children:V("focus.copy_instruction").replace("{0}",t)}),P?(0,g.jsxs)("div",{className:"pr-retail-share-focus-fallback",children:[(0,g.jsxs)("div",{className:"pr-retail-share-focus-fallback-buttons",children:[(0,g.jsx)(p.Z,{className:"pr-btn-copy-fallback",copyText:u,onCopy:U,localizations:n,targetId:"#pr-retail-share-focus-copy-fallback",onClick:function(){y(h.WAR.share_to_retailer_clicked(q)),L||O(!0)},children:V("fallback.copy_button")}),(0,g.jsx)("span",{children:V("fallback.italic_text")}),(0,g.jsx)("button",{className:"pr-accessible-btn pr-accessible-btn--fallback",onClick:U,children:V("fallback.share_button").replace("{0}",t)})]}),(0,g.jsx)(f.Z,{id:"pr-retail-share-focus-copy-fallback",value:u})]}):(0,g.jsx)(p.Z,{disabled:C,onClick:function(){return y(h.WAR.share_to_retailer_clicked(q))},className:"pr-accessible-btn",copyText:u,onCopy:U,onError:function(){P||T(!0)},localizations:E,children:C?V("tooltip.success"):V("normal.button").replace("{0}",t)})]})]})})};function w(){return(0,g.jsxs)("div",{className:"pr-retail-share-focus-loader","aria-hidden":"true",children:[(0,g.jsx)("div",{}),(0,g.jsx)("div",{}),(0,g.jsx)("div",{})]})}function b(e){var t=e.steps;return(0,g.jsx)("ul",{className:"pr-retail-share-focus_steps",children:i()(t).call(t,(function(e,t){return(0,g.jsxs)("li",{className:"pr-retail-share-focus_step",children:[(0,g.jsx)("div",{className:"pr-retail-share-focus_step_number",children:t+1}),e]})}))})}},18197:function(e,t,r){"use strict";r.d(t,{V:function(){return m}});var n=r(22882),i=r.n(n),o=r(49216),a=r.n(o),s=r(20261),l=r.n(s),c=r(32142),u=r.n(c),d=r(98189),p=r.n(d),f=r(27369),h=r(30810);function m(e,t,r){return v.apply(this,arguments)}function v(){return(v=a()(l().mark((function e(t,r,n){var o,a;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=(0,h.$)("write_services_base_url",t)||"stable",a=(0,f.B$)(o).writeBase,e.next=4,fetch(a+"/war/writereview/rating?merchant_id="+t.merchant_id+"&page_id="+t.page_id+"&locale="+t.locale,{method:"POST",headers:i()({"Content-Type":"application/json"},n&&{"x-pr-uid":n}),body:u()({rating:r}),credentials:"include"}).then((function(e){return e.ok?e.json():p().reject(e)}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},10338:function(e,t,r){"use strict";t.ZP={WAR:{social_measurement_id:"wr",ga_id:"submit2verify",start:"start",complete:"askForLogin",smsStart:"sms-start",smsComplete:"sms-submit",error:"submit_error",share_to_retailer_present:function(e){return"share_to_retailer_present_"+e},share_to_retailer_clicked:function(e){return"share_to_retailer_clicked_"+e}},WARIF:{social_measurement_id:"if",ga_id:"if",start:"start",complete:"thankyou",error:"submit_error"},WARMO:{social_measurement_id:"mo",ga_id:"mo",start:"start",caption:"caption",complete:"thankyou",error:"submit_error"},SRW:{social_measurement_id:"srw",ga_id:"srw",start:"start",complete:"thankyou",error:"submit_error"},WAQ:{ga_id:"question",start:"edit_page",complete:"finished_page",error:"submit_error"},WAA:{ga_id:"answer",start:"edit_page",complete:"finished_page",error:"submit_error"},WYB:{ga_id:"wyb",start:"edit_page",complete:"finished_page",error:"submit_error"},AS:{ga_id:"as",start:"call_to_action",complete:"redirected",error:"fallback",fallback_copy:"fallback_copy",fallback_complete:"fallback_redirected"},RYP:{social_measurement_id:"ryp",ga_id:"ryp",start:"start",click:"star_click",complete:"review_submission",error:"error",image:"image_upload"},REVIEW_DISPLAY:{social_measurement_id:"rd"},QA_DISPLAY:{social_measurement_id:"ab"},RID:{social_measurement_id:"rid"},REVIEW_SNIPPET:{social_measurement_id:"rd"},QA_SNIPPET:{social_measurement_id:"ab"},IMAGE_SNIPPET:{social_measurement_id:"is"},IRL_SNIPPET:{social_measurement_id:"irl"},REVIEW_SNAPSHOT:{social_measurement_id:"rd"},FEEDLESS_PRODUCT_CATALOG:{social_measurement_id:"fp"},ADD_TO_CART:{social_measurement_id:"atc"}}},5751:function(e,t,r){"use strict";t.ZP={ReviewDisplay:"ReviewDisplay",ReviewList:"ReviewList",ReviewSnapshot:"ReviewSnapshot",ReviewSnippet:"ReviewSnippet",QuestionDisplay:"QuestionDisplay",QuestionSnippet:"QuestionSnippet",WriteAReview:"WriteAReview",WriteAQuestion:"WriteAQuestion",WriteAnAnswer:"WriteAnAnswer",Write:"Write",ReviewYourPurchases:"ReviewYourPurchases",SellerRatings:"SellerRatings",WhydYouBuy:"WhydYouBuy",WhydYouBuyDisplay:"WhydYouBuyDisplay",ReviewImageDisplay:"ReviewImageDisplay",ReviewImageSnippet:"ReviewImageSnippet",AddToCart:"AddToCart",CategorySnippet:"CategorySnippet",IRLSnippet:"IRLSnippet",SizeFitSnippet:"SizeFitSnippet"}},94380:function(e,t){"use strict";t.Z={RESTRICTED_WORD:"RestrictedWord",INVALID_VALUE:"InvalidValue",REQUIRED_FIELD:"RequiredField",REQUEST_FAILED:"REQUEST_FAILED",FATAL_ERROR:"FATAL_ERROR",FATAL_SUBMIT_REVIEW_FAILURE:"FATAL_SUBMIT_REVIEW_FAILURE",DUPLICATE_REVIEW:"DUPLICATE_REVIEW",NON_FATAL_ERROR:"NON_FATAL_ERROR",MISSING_PARAMETER:"MISSING_PARAMETER",INVALID_PARAMETER:"INVALID_PARAMETER"}},52762:function(e,t){"use strict";t.Z={UPDATE_FIELD:"UPDATE_FIELD",LOADED:"LOADED",COMPLETE:"COMPLETE",SUBMISSION_ERROR:"SUBMISSION_ERROR"}},16679:function(e,t,r){"use strict";r.d(t,{J0:function(){return c},MT:function(){return u},Oj:function(){return l},Pp:function(){return s},dB:function(){return a},k:function(){return o},nk:function(){return i},yW:function(){return n}});var n="REVIEW_DISPLAY",i="REVIEW_SNAPSHOT",o="QA_DISPLAY",a="RID",s="REVIEW_SNIPPET",l="QA_SNIPPET",c="IMAGE_SNIPPET",u="IRL_SNIPPET";t.ZP={WAR:"WAR",WARIF:"WARIF",WARMO:"WARMO",REVIEW_DISPLAY:n,REVIEW_LIST:"REVIEW_LIST",REVIEW_SNAPSHOT:i,RYP:"RYP",SRW:"SRW",WAQWAA:"WAQWAA",WYB:"WYB",WYB_DISPLAY:"WYB_DISPLAY",QA_DISPLAY:o,RID:a,REVIEW_SNIPPET:s,QA_SNIPPET:l,IMAGE_SNIPPET:c,CATEGORY_SNIPPET:"CATEGORY_SNIPPET",IRL_SNIPPET:u,SIZEFIT_SNIPPET:"SIZEFIT_SNIPPET"}},33773:function(e,t,r){"use strict";r.d(t,{k4:function(){return n},pX:function(){return i}});var n="IMAGE",i="VIDEO"},81478:function(e,t){"use strict";t.Z={POST:"POST",REQUEST:"REQUEST"}},93650:function(e,t,r){"use strict";var n=r(76808);t.Z={newest:{sm:n.REVIEW_DISPLAY_SORT_MOST_RECENT,sort:{type:"created_date",order:"desc"},apiText:"Newest"},oldest:{sm:n.REVIEW_DISPLAY_SORT_OLDEST,sort:{type:"created_date",order:"asc"},apiText:"Oldest"},highestrating:{sm:n.REVIEW_DISPLAY_SORT_HIGHEST,sort:{type:"rating",order:"desc"},apiText:"HighestRating"},lowestrating:{sm:n.REVIEW_DISPLAY_SORT_LOWEST,sort:{type:"rating",order:"asc"},apiText:"LowestRating"},mosthelpful:{sm:n.REVIEW_DISPLAY_SORT_MOST_HELPFUL,sort:{type:"helpful_votes",order:"desc"},apiText:"MostHelpful"},mediasort:{sm:n.REVIEW_DISPLAY_SORT_IMAGES,sort:{type:"mediasort",order:"desc"},apiText:"MediaSort"},language:{sm:n.REVIEW_DISPLAY_SORT_NATIVE_LANGUAGE_FIRST,sort:{type:"native_language",order:"desc"},apiText:"Language"}}},39646:function(e,t,r){"use strict";r.d(t,{Bj:function(){return n},ly:function(){return i}});var n="IN_PROGRESS",i="COMPLETE";t.ZP={PENDING:"PENDING",IN_PROGRESS:n,COMPLETE:i,OFF:"OFF"}},9328:function(e,t){"use strict";t.Z={EMAIL:"EMAIL"}},35213:function(e,t,r){"use strict";r.d(t,{f:function(){return s}});var n=r(98189),i=r.n(n),o=r(21798),a=r(81138),s=function(e){var t=e.initProxy("/m/{merchant_id}/l/{locale}/configuration"),r=t.url,n=t.headers,a=o.x.getItem(r)||{},s=a.$value,l=a.$timestamp;return null!=s&&s.properties&&null!=s&&s.localizations&&null!=s&&s.features&&Date.now()-l<144e5?i().resolve(s):fetch(r,{method:"GET",headers:n}).then(e.checkResponseStatus).then((function(e){return e.json()})).then((function(e){return o.x.setItem(r,{$value:e,$timestamp:Date.now()}),e}))};s=(0,a.Rg)(s)},3753:function(e,t,r){"use strict";r.d(t,{E_:function(){return _},ZR:function(){return b},iV:function(){return w}});var n=r(42461),i=r.n(n),o=r(49924),a=r.n(o),s=r(31734),l=r.n(s),c=r(2784),u=r(30810),d=(r(27353),r(81138)),p=r(35213),f=r(40079),h=r(66584),m=r(62586),v=r(93650),g=r(52322),_=c.createContext(),y=new h.I(["ReviewDisplay","ReviewSnapshot","ReviewList","ReviewImageDisplay","ReviewImageSnippet","SizeFitSnippet"]);function w(e){var t=e.config,r=void 0===t?{}:t,n=e.children,o=(0,c.useState)((function(){var e=(0,u.$)("read_services_base_url",r)||"stable";return new d.rY(e,r)}))[0],s=(0,c.useState)({}),w=s[0],b=w.status,x=w.data,E=s[1],S=(0,c.useState)(!1),C=S[0],j=S[1];(0,c.useEffect)((function(){null==b&&(E({status:"pending"}),(0,p.f)(o).then((function(e){E({status:"fulfilled",data:e})})).catch((function(e){console.error("Error fetching display configuration"),E({status:"rejected",data:e})})))}),[o,b]);var I=(0,c.useMemo)((function(){return"fulfilled"!==b?{config:r}:{config:r,merchantProperties:x.properties,localizations:x.localizations,features:x.features,displayApi:o,reviewTranslationEnabled:(0,f.s)(r.locale,x.properties),componentKeys:(0,h.I)(i()(r.__componentKeys||{}))}}),[r,x,o,b]);return(0,c.useEffect)((function(){if(!0!==C&&"fulfilled"===b){m.V.setItem("reviewTranslationEnabled",I.reviewTranslationEnabled);var e=!1;if(r.__componentKeys)for(var t=0,n=i()(r.__componentKeys);t=2){var a=r[0],l=r[1];return function(t){return e(a,l,t)}}return e}},67900:function(e,t,r){"use strict";r.d(t,{Pv:function(){return C}});var n=r(22882),i=r.n(n),o=r(22176),a=r.n(o),s=r(66397),l=r.n(s),c=r(23972),u=r.n(c),d=r(50428),p=r.n(d),f=r(23650),h=r.n(f),m=r(22788),v=r.n(m),g=r(90899),_=r.n(g),y=r(76808),w=r(74368),b=r(43458),x=r(58697),E=r.n(x),S="https://t.powerreviews.com/t/v1.gif".replace(/^(https?:){0,1}\/\/|/i,"https://");var C=function(){function e(e){a()(this,"q",[]),a()(this,"uid",void 0),a()(this,"obfuscateBeacon",void 0),a()(this,"merchantGroupId",void 0),a()(this,"merchantId",void 0),a()(this,"locale",void 0),a()(this,"siteId",void 0);var t=e.SOCIAL_MEASUREMENT_DATA,r=e.SOCIAL_MEASUREMENT_COOKIE_DOMAIN,n=e.SM_DATA,i=e.OX,o=e.MERCHANT_GROUP_ID,s=e.LOCALE,l=e.MERCHANT_ID,c=e.SITE_ID;this.obfuscateBeacon=i,this.merchantGroupId=o,this.merchantId=l,this.locale=s,this.siteId=c,this.cookieDomain=r,this.setMode(n||t)}var t=e.prototype;return t.getUserId=function(){return"ENABLED"===this.mode?this.uid:null},t.setupUserId=function(){var e,t,r=(t=null!=(e=this.merchantGroupId)?e:this.merchantId,"__pr."+l()(t,10).toString(36));switch(this.mode){case"NO_COOKIES":(0,w.kT)(r,this.cookieDomain),this.uid="no_cookies";break;case"DISABLED":(0,w.kT)(r,this.cookieDomain),this.uid=null;break;case"ENABLED":this.uid=(0,w.ej)(r),this.uid||(this.uid=E()(10)),(0,w.d8)(r,this.uid,2592e3,this.cookieDomain);break;default:throw new Error("Unsupported SOCIAL_MEASUREMENT_DATA value: "+this.mode)}},t.setMode=function(e){var t=this;e&&(this.mode=e,this.setupUserId(),this.q.forEach((function(e){t.sendBeacon.apply(t,e)})),this.q=[])},t.sendBeacon=function(e,t,r){var n;if(void 0!==this.mode){var o=null===(n=y[t])||void 0===n?void 0:n.social_measurement_id;if(!o)throw new Error("Unknown event type: "+t);if("DISABLED"!==this.mode||o===y.FEEDLESS_PRODUCT_CATALOG.social_measurement_id){var a=i()({locale:this.locale,pageId:e,merchantId:this.merchantId,merchantGroupId:this.merchantGroupId,siteId:this.siteId,displayVersion:"4.0",displayBuildVersion:"10349",id:E()(10),time:Date.now().toString(36),userId:this.uid,event:o,pageUrl:window.document.location.href,referrerUrl:window.document.referrer,eventType:"string"==typeof r?r:void 0},"object"==typeof r&&r),s=new(u())(S);if(p()(b.R).forEach((function(e){var t=e[0],r=e[1],n=I(a[t]);j(n)&&s.searchParams.append(r,n)})),this.obfuscateBeacon){var l,c=k(decodeURIComponent(N(s.searchParams)));h()(v()(l=s.searchParams).call(l)).forEach((function(e){s.searchParams.delete(e)})),s.searchParams.append("rwp_xe",c)}var d=N(s);return(new Image).src=d}}else this.q.push(arguments)},e}();function j(e){return Boolean(e)&&!function(e){return"number"==typeof e&&e!=e}(e)}function I(e,t){void 0===t&&(t=0);var r=[],n=[";",","];if(Array.isArray(e)&&t0){var t=e.target,r=h.get(t);if(r){var n=function(){r(!0),_.unobserve(t),h.delete(t)};"requestIdleCallback"in window?requestIdleCallback(n,{timeout:50}):setTimeout(n,0)}}}))}))}))[0],y=null!=s;(0,m.useEffect)((function(){var e=new ResizeObserver((0,b.D)((function(e){p().resolve().then((function(){return e.forEach((function(e){if(e.contentRect){var t=e.contentRect.width;d.current.emit("resize",t)}}))}))}),250));return e.observe(r),function(){e.disconnect()}}),[r]);var x=(0,m.useMemo)((function(){return{observe:function(e,t){_.observe(e),h.set(e,t)},unobserve:function(e){_.unobserve(e),h.delete(e)}}}),[_,h]);(0,m.useEffect)((function(){return x.observe(r,o),function(){return _.disconnect()}}),[_,r,x]),(0,m.useEffect)((function(){if(!y){var e=r.clientWidth;if(e<=0)for(var t=r;e<=0;)e=t.clientWidth,t=t.parentNode;c(e)}}),[y,r]);var S=(0,m.useMemo)((function(){return{rootNode:r,initialWidth:s,isVisible:i}}),[r,s,i]);return v.createPortal((0,E.jsx)("div",{className:"p-w-r",children:(0,E.jsx)(C.Provider,{value:S,children:(0,E.jsx)(j.Provider,{value:d.current,children:(0,E.jsx)(I.Provider,{value:x,children:y?m.cloneElement(f,{onLoad:function(){return function(e){l()(e.querySelectorAll("[data-pr-placeholder]")).forEach((function(e){window.requestAnimationFrame((function(){return e.style.display="none"}))}))}(r)},elementConfig:(0,g.T)(r)}):null})})})}),r)}function N(){var e=(0,m.useContext)(j),t=(0,m.useContext)(C).initialWidth,r=(0,m.useState)(t),n=r[0],i=r[1];return(0,m.useEffect)((function(){var t=function(e){0!==e&&i(e)};return e.on("resize",t),function(){e.off("resize",t)}}),[e]),n}function R(e){var t=e.children,r=e.sizes,n=e.callback,i=h()(r).call(r,(function(e,t){return e.width-t.width})),o=N(),a=function(){for(var e=null,t=0;ti[t].width&&(e=i[t]);return e}();(0,m.useEffect)((function(){a&&n&&n(a.name)}),[a,n]);var s=Array.isArray(t)&&1===m.Children.count(t)&&t[0];return s=m.Children.only(t),m.cloneElement(s,{className:y()(s.props.className,(null==a?void 0:a.name)||"")})}function P(e,t){void 0===t&&(t=!1);var r=(0,m.useRef)(),n=(0,m.useContext)(I);if(null==n)throw new Error("useComponentVisibilitySensor must be used within a ComponentVisibilityProvider");var i=n.observe,o=n.unobserve;return(0,m.useEffect)((function(){if(null!=r.current&&!t){var n=r.current;return i(n,e),function(){o(n,e)}}}),[i,o,t,e]),{ref:r}}function T(e,t){var r=e.children,n=e.onChange,o=e.disabled,s=e.as,l=void 0===s?"div":s,c=a()(e,S),u=P(n,o).ref;if("function"==typeof r)return r(u);var d=l;return(0,E.jsx)(d,i()(i()({ref:(0,x.l)(t,u)},c),{},{children:r}))}T=m.forwardRef(T)},302:function(e,t,r){"use strict";r.d(t,{R:function(){return m}});var n=r(90899),i=r.n(n),o=r(32142),a=r.n(o),s=r(36004),l=r.n(s),c=r(98189),u=r.n(c),d=r(83444),p=(0,r(54504).Z)(),f=function(e,t){return t instanceof d.r?t.toString():t},h=function(e){return i()(e).call(e,(function(e){return a()(e,f)})).join("$")};function m(e,t){void 0===t&&(t=h);var r=new(l());return function(){for(var n=arguments.length,i=new Array(n),o=0;o=200&&e.status<300)return e;var t=new Error(e.statusText);throw t.response=e,t},e.checkNetworkError=function(e){if(e instanceof TypeError)throw new Error("Network Error");throw e},a()(e,[{key:"baseUrl",get:function(){var e=v.EnvironmentVariables[this.stage],t=e.b2cReadOrigin,r=e.b2cReadBase;return(0,h.Y)(this.config.nocache?t:r)}},{key:"baseProxyUrl",get:function(){var e=v.EnvironmentVariables[this.stage],t=e.b2cReadOrigin,r=e.b2cReadProxy;return(0,h.Y)(this.config.nocache?t:r)}}]),e}();function _(e){return e.replace(/\/$/,"")}},16237:function(e,t,r){"use strict";r.d(t,{B:function(){return y},Q:function(){return w}});var n=r(22882),i=r.n(n),o=r(32142),a=r.n(o),s=r(29275),l=r.n(s),c=r(8717),u=r.n(c),d=r(90899),p=r.n(d),f=r(50381),h=r.n(f),m=r(42461),v=r.n(m),g=r(302),_=r(62586),y=function(e,t,r){var n=void 0===r?{}:r,o=n.sorts,a=n.filters,s=n.pageSize,l=n.localeOverride,c=!0,d={page_id:t},p=!1;null!=l&&(d.locale=l,c="all"===l),!0===_.V.getItem("reviewTranslationEnabled")&&(d.locale="all",p=!0);var f=e.init("/m/{merchant_id}/l/{locale}/product/{page_id}/reviews",d,i()({_noconfig:c,page_locale:p?"{locale}":null,"paging.size":s,sort:b(o)},function(e){var t={};if(Array.isArray(e)&&e.length>0){var r=[],n=u()(e).call(e,(function(e,t){return e[t.attribute]?e[t.attribute].push(t.value):e[t.attribute]=[t.value],e}),{});v()(n).forEach((function(e){"search"===e&&n[e][0].length?t.search=n[e][0]:"variant"===e?t.variant=n[e][0]:"native_only"===e?t.native_only=n[e][0]:r.push(e+":"+n[e].join("||"))})),r.length&&(t.filters=r.join(","))}return t}(a))),h=f.url,m=f.headers;return fetch(h,{method:"GET",headers:m}).then(e.checkResponseStatus).then((function(e){return e.json()}))};function w(e,t){var r,n,i="review_"+t+"_filters";if(window.location.search){var o=new(l())(window.location.search);r=o.get("pr_"+i)||o.get("pr_"+i.toUpperCase())}return null==r&&(r=e[i]||e[i.toUpperCase()]||e["pr_"+i]||e["pr_"+i.toUpperCase()]),r?u()(n=decodeURIComponent(r).split(",")).call(n,(function(e,t){var r=t.split(":");return"search"===r[0]||"rating"===r[0]||r[1].split("||").forEach((function(t){e.push({attribute:r[0],value:t})})),e}),[]):null}function b(e){var t;if(e&&e.length>0)return p()(t=h()(e).call(e,(function(t){return"created_date"!==t.type||1===e.length}))).call(t,(function(e){if("string"==typeof e)return e;switch(e.type){case"rating":return"asc"===e.order?"LowestRating":"HighestRating";case"helpful_votes":return"MostHelpful";case"created_date":return"asc"===e.order?"Oldest":"Newest";case"mediasort":return"MediaSort";case"native_language":return"Language";default:return null}})).join(",")}y=(0,g.R)(y,a())},90258:function(e,t,r){"use strict";r.d(t,{N:function(){return i}});var n=r(53304);function i(e,t){var r=t.review_id,i=e.init("/m/{merchant_id}/l/{locale}/review/{review_id}",{review_id:r},{_noconfig:!0}),o=i.url,a=i.headers;return fetch(o,{method:"GET",headers:a}).then(e.checkResponseStatus).then((function(e){return e.json()})).then((function(e){return(0,n.ru)(e.results)[0]}))}},12226:function(e,t,r){"use strict";r.d(t,{S:function(){return i}});var n=r(62586);function i(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i=0;n--){var o,a=r[n];if(0===i()(o=a.name).call(o,"data-pr-")){var s=a.name.replace("data-pr-","").toLowerCase();t[s=s.replace(/-/g,"_")]=l(a.value)}}return t}function l(e){if("string"==typeof e){if("true"===(e=a()(e).call(e)))return!0;if("false"===e)return!1}return e}},62586:function(e,t,r){"use strict";r.d(t,{V:function(){return u}});var n=r(31734),i=r.n(n),o="[[PowerreviewsGlobalObject]]";function a(e){return window[o][e]}function s(e,t){try{i()(window[o],e,{configurable:!1,enumerable:!1,writable:!1,value:t})}catch(e){0}}window.hasOwnProperty(o)||i()(window,o,{configurable:!1,enumerable:!1,writable:!1,value:{}});var l="@@init",c="stable(10349)";var u={getItem:a,setItem:s,setItemVolatile:function(e,t){window[o][e]=t},initialize:function(){s("version","4.0"),s("buildVersion","10349"),s(l,c)},get isInitialized(){return a(l)===c}}},25857:function(e,t,r){"use strict";r.d(t,{r:function(){return u}});var n=r(22882),i=r.n(n),o=r(2784),a=r(30810),s=r(52322),l=(window.io_min_flash_version=3e3,"pr-iovation"),c=function(){var e=!1;try{e=Boolean(new ActiveXObject("ShockwaveFlash.ShockwaveFlash"))}catch(t){e=!(!navigator||!navigator.mimeTypes)&&void 0!==navigator.mimeTypes["application/x-shockwave-flash"]}return e}();function u(e){return function(t){var r=t.config,n=t.merchant,u=null==n?void 0:n.configuration,d=(0,o.useState)(),p=d[0],f=d[1];return(0,o.useEffect)((function(){null!=r&&null!=u&&f(function(e,t){var r=(0,a.v)(e,t),n=r.ENABLE_FRONT_END_IOVATION_VALIDATION,i=void 0===n||n;return"ru_RU"!==r.LOCALE&&i}(u,r))}),[r,u]),(0,o.useEffect)((function(){if(p&&!document.getElementById(l)){var e=document.createElement("script");e.src="https://mpsnare.iesnare.com/snare.js",e.id=l;var t=document.getElementsByTagName("script")[0];t?t.parentNode.insertBefore(e,t):document.body.appendChild(e)}}),[p]),(0,o.useEffect)((function(){if(p){var e,t=0;return c&&(e=setInterval((function(){var r=document.getElementById("stmgwb2");r?(r.setAttribute("aria-hidden","true"),clearInterval(e)):t>=5?clearInterval(e):t++}),1e3)),function(){return e&&clearInterval(e)}}}),[p]),(0,s.jsx)(e,i()(i()({},t),{},{iovationRequired:p}))}}},21798:function(e,t,r){"use strict";r.d(t,{x:function(){return s}});var n=r(32142),i=r.n(n),o=r(16948);function a(){try{var e=o.ZP.parse(sessionStorage.getItem("powerreviews"));if("object"==typeof e&&"Object"===e.constructor.name)return e}catch(e){}return{}}var s={getItem:function(e){return a()[e]},setItem:function(e,t){try{var r=a();r[e]=t,sessionStorage.setItem("powerreviews",i()(r))}catch(e){}}}},70252:function(e,t,r){"use strict";r.d(t,{A6:function(){return oe},AF:function(){return H},DK:function(){return j},DV:function(){return $},Gv:function(){return R},IK:function(){return ae},L4:function(){return Z},L5:function(){return z},N5:function(){return ee},PJ:function(){return re},Qw:function(){return ne},TU:function(){return J},UT:function(){return V},VO:function(){return N},WA:function(){return L},WL:function(){return W},YO:function(){return q},YP:function(){return te},Ys:function(){return O},fp:function(){return P},jM:function(){return D},lc:function(){return F},m2:function(){return B},oh:function(){return K},qb:function(){return G},rA:function(){return X},sz:function(){return U},t4:function(){return Y},tO:function(){return k},tZ:function(){return ie},uW:function(){return T},uq:function(){return C},yg:function(){return A},yl:function(){return M},zk:function(){return I}});var n=r(22882),i=r.n(n),o=r(71899),a=r.n(o),s=r(90899),l=r.n(s),c=r(98189),u=r.n(c),d=r(86166),p=r.n(d),f=r(50381),h=r.n(f),m=r(8717),v=r.n(m),g=r(29406),_=r.n(g),y=r(33773),w=r(37389),b=r(51519),x=r(84272),E=r(94380),S=r(30810),C="WRITE_A_REVIEW_INITIAL_FETCH",j="WRITE_A_REVIEW_INITIAL_FETCH_SUCCESS",I="WRITE_A_REVIEW_INITIAL_FETCH_ERROR_INVALID_PARAMETER",k="WRITE_A_REVIEW_INITIAL_FETCH_ERROR_MISSING_PARAMETERS",N="WRITE_A_REVIEW_INITIAL_FETCH_ERROR_DUPLICATE_REVIEW",R="WRITE_A_REVIEW_INITIAL_FETCH_ERROR_UNKNOWN",P="WRITE_A_REVIEW_SUBMIT",T="WRITE_A_REVIEW_SUBMIT_SUCCESS",A="WRITE_A_REVIEW_SUBMIT_ERROR_COPPA",L="WRITE_A_REVIEW_SUBMIT_ERROR_VALIDATION",O="WRITE_A_REVIEW_SUBMIT_ERROR_UNKNOWN",D="WRITE_A_REVIEW_CANCEL_SUBMIT",M="WRITE_A_REVIEW_UPDATE_FIELD",F="WRITE_A_REVIEW_UPDATE_FIELDS",z="WRITE_A_REVIEW_UPDATE_WAR_MEDIA",V="WRITE_A_REVIEW_ADD_MEDIA",q="WRITE_A_REVIEW_REMOVE_MEDIA",W="WRITE_A_REVIEW_UPDATE_MEDIA",U="WRITE_A_REVIEW_UPDATE_MEDIA_CAPTION",Z="WRITE_A_REVIEW_ROTATE_MEDIA",B="WRITE_A_REVIEW_MEDIA_ONLY_SUBMIT_SUCCESS",H="WRITE_A_REVIEW_SET_MESSAGE",K="WRITE_A_REVIEW_SET_SUBMIT_ERROR_MESSAGE",G=function(e){var t=(0,b.iC)(e);return function(r){return r({type:C,productKey:t}),(0,w.Xj)(e,{includeLocalizations:!0}).then((function(n){var i,o;switch(n.statusCode){case 200:o=j;break;case 403:o=N;break;case 400:case 500:case null:o=n.body&&a()(i=n.body.message).call(i,"Missing merchant identifier request parameters")>-1?k:R;break;case 404:o=I;break;default:o=R}var s=!0===(0,S.$)("pr_autosubmit"),l=x.pO(e);l=x.n2(l)?l:{},r({type:o,productKey:t,feedlessProductInfo:l,body:n.body,fields:n.body.fields?(0,b.bY)(e,n.body.fields):[],isSubmitting:s})})).catch((function(e){console.log(e)}))}},Q=function(e){var t=l()(e).call(e,(function(e){return e.isUploaded?new(u())((function(t){return t(i()({},e))})):new(u())((function(t){var r;e.type===y.k4?r="Image":e.type===y.pX&&(r="NativeVideo"),(0,w.$i)(e.file,e.type).then((function(n){t(i()(i()({},e),{},{isUploaded:!0,meta:i()(i()({},e.meta),{},{composite_data:n,composite_type:r,field_type:"composite",fields:[{field_type:"simple",input_type:"TextBox",key:"caption",value:e.caption}]})}))}))}))}));return u().all(t)},Y=function(e){var t=(0,b.iC)(e);return function(r){return r({type:C,productKey:t}),(0,w.Xj)(e,{includeLocalizations:!0}).then((function(n){var i;switch(n.statusCode){case 200:i=j;break;case 404:i=k;break;default:i=R}var o=x.pO(e);return o=x.n2(o)?o:{},r({type:i,productKey:t,body:n.body,feedlessProductInfo:o,fields:n.body.fields||[]})})).catch((function(e){console.log(e)}))}},$=function(e,t){var r=(0,b.iC)(e);return function(e){e({type:F,productKey:r,fields:t}),t.forEach((function(t,n){"Image"!==t.composite_type&&"NativeVideo"!==t.composite_type||p()(t)&&p()(t).forEach((function(t,i){var o;if(!t.isUploaded){var s=a()(o=t.file.file.type).call(o,"video")>-1?y.pX:y.k4;(0,w.$i)(t.file.file,s).then((function(t){e({type:z,productKey:r,fieldIndex:n,valueIndex:i,composite_data:t,fileType:s})}))}}))}))}},X=function(e,t){var r=(0,b.iC)(e);return function(e){return e({type:V,productKey:r,media:t}),Q(t).then((function(t){return e({type:W,productKey:r,media:t})}))}},J=function(e,t,r){var n=(0,b.iC)(e);return{type:q,productKey:n,mediaType:r,index:t}},ee=function(e,t,r,n){var i=(0,b.iC)(e);return{type:U,productKey:i,mediaType:n,index:t,caption:r}},te=function(e,t){var r=(0,b.iC)(e);return{type:Z,productKey:r,index:t}},re=function(e,t){var r=(0,b.iC)(e);return{type:H,productKey:r,message:t}},ne=function(e,t){var r=(0,b.iC)(e);return{type:K,productKey:r,message:t}},ie=function(e){var t=(0,b.iC)(e);return{type:D,productKey:t}},oe=function(e,t,r,n,o,a){var s=(0,b.iC)(e);return function(c){return c({type:P,productKey:s}),function(e){var t=l()(e).call(e,(function(e){if(!e.rotation)return e;var t=e.meta.composite_data.raw.url;return i()(i()({},e),{},{isUploaded:!1,file:{source:t.replace("/upload/","/upload/a_"+e.rotation+"/")}})}));return Q(t)}(t).then((function(t){var u={context_information:n,fields:l()(t).call(t,(function(e){return i()(i()({},e.meta),{},{fields:[{field_type:"simple",input_type:"TextBox",key:"caption",value:e.caption}]})})),iovation_black_box:o,tracking_user_id:a};return r.name&&(u.product_information=r),(0,w.xi)(u,i()(i()({},e),{},{is_complete:!1,review_type:"media_first"})).then((function(e){var t,r=e.body;switch(e.statusCode){case 200:t=B;break;case 400:if(t=O,e.body.fields){var n,o,a,u,d=h()(n=v()(o=l()(a=h()(u=e.body.fields).call(u,(function(e){return e.fields}))).call(a,(function(e){return e.fields}))).call(o,(function(e,t){return _()(e).call(e,t)}),[])).call(n,(function(e){return e.error_message&&e.error_message.error_code===E.Z.RESTRICTED_WORD}));d.length>0&&(t=L,r=i()(i()({},e.body),{},{message:d[0].error_message.message}))}break;default:t=O}return c({type:t,productKey:s,body:r})}))}))}},ae=function(e,t,r,n,o,a,s){var c=(0,b.iC)(e);return function(d){var p;d({type:P,productKey:c});var f={context_information:n,fields:x.pR(t).fields,iovation_black_box:o,tracking_user_id:s},m=l()(p=f.fields).call(p,(function(e){return new(u())((function(t){var r="Image"===e.composite_type,n="NativeVideo"===e.composite_type;if(!r&&!n||!e.rotation)return t(e);var o=(r?e.composite_data.raw.url:e.composite_data.video_url).replace("/upload/","/upload/a_"+e.rotation+"/");return(0,w.$i)({source:o},"Image"===e.composite_type?y.k4:y.pX).then((function(r){return t(i()(i()({},e),{},{composite_data:r}))}))}))}));return u().all(m).then((function(t){return f.fields=t,r.name&&(f.product_information=r),(0,w.xi)(f,i()(i()({},e),{},{is_complete:!0,review_type:a?"media_first":void 0})).then((function(e){var t=O,r=e.body;switch(e.statusCode){case 200:t=T;break;case 400:if("AgeDisclosure"===e.body.error_code)t=A;else if(e.body.fields){var n,o,a=h()(n=v()(o=e.body.fields).call(o,(function(e,t){return t.fields?e.push.apply(e,t.fields):e.push(t),e}),[])).call(n,(function(e){return e.error_message&&(e.error_message.error_code===E.Z.RESTRICTED_WORD||e.error_message.error_code===E.Z.INVALID_VALUE)}));a.length>0&&(t=L,r=i()(i()({},e.body),{},{message:e.body.message||a[0].error_message.message}))}break;default:t=O}return d({type:t,productKey:c,body:r})}))}))}}},46711:function(e,t,r){"use strict";var n=r(22882),i=r.n(n),o={onReviewComponentRender:function(e,t,r){var n={component:e,page_id:t.config.page_id},i={review_count:r.review_count,average_rating:r.average_rating};t.config.on_render(n,i)},onReviewComponentChange:function(e,t,r){var n={component:e,page_id:t.config.page_id},i={review_count:r.review_count,average_rating:r.average_rating,reviews:r.reviews};t.config.on_change(n,i)},onImageComponentRender:function(e,t,r){var n={component:e,page_id:t.config.page_id},i={review_image_count:r.review_image_count};t.config.on_render(n,i)},onQuestionsComponentRender:function(e,t,r){var n={component:e,page_id:t.config.page_id},i={question_count:r.total};t.config.on_render(n,i)},onWriteComponentRender:function(e,t){var r={component:e,page_id:t.config.page_id};t.config.on_render(r,{})},onWriteComponentSubmit:function(e,t,r){var n={component:e,page_id:t.config.page_id},o=i()({},r);t.config.on_submit(n,o)}};t.Z=o},30810:function(e,t,r){"use strict";r.d(t,{$:function(){return g},v:function(){return v}});var n=r(22882),i=r.n(n),o=r(8717),a=r.n(o),s=r(50381),l=r.n(s),c=r(42461),u=r.n(c),d=r(29406),p=r.n(d),f=r(51519),h=r(36631),m=/^pr_/i,v=function(){for(var e={},t=[],r=arguments.length,n=new Array(r),o=0;o1?r-1:0),i=1;i-1||i()(r=window.POWERREVIEWS.display.fastUnpublishedReviews).call(r,Number(o))>-1))},_=function(e,t){void 0===e&&(e={}),void 0===t&&(t={});var r=(0,c.v)(t,e),n=r.ENABLE_CLIENT_SIDE_STRUCTURED_DATA,i=r.CLIENT_SIDE_STRUCTURED_DATA_FORMAT,o=r.STRUCTURED_DATA_PRODUCT_ID,a=n&&"MICRODATA"!==i;return{showJSONLD:a,showMicrodata:n&&"MICRODATA"===i,useNestedJSONLD:a&&!(null!=o)}},y=function(e){var t=0,r=0;e.forEach((function(e,n){r+=e.count||0,t+=(e.count||0)*n}));var n=t/r;return 3===e.length?2*n:n},w=function(e){var t=y(e),r=l()(e).call(e,(function(r){return e.length>3?r.position===Math.round(t):r.position===Math.round(t/2)}));return r.length&&r[0].label?r[0].label:""},b=function(e){var t={};for(var r in e)t[r]=(0,c.$)(r,e,!0);var n=(0,u.Qf)(),i=(0,c.$)("pr_enhanced_content_security_enabled",t,!0)||(0,c.$)("pr_enable_enhanced_content_security",t,!0),o=(0,d.I)(["return_url","product","enable_front_end_iovation_validation"]);for(var a in i&&(o.add("style_sheet"),o.add("review_wrapper_url")),n)if("page_id"!==a||e.components.Write||e.components.WriteAReview||e.components.WriteAQuestion||e.components.WriteAnAnswer||e.components.WhydYouBuy||e.components.SellerRatings){var s=a;"pr_"===a.substr(0,3)&&(s=a.substr(3,a.length)),o.has(s)||(t[s]=n[a])}return t}},51519:function(e,t,r){"use strict";r.d(t,{Cu:function(){return P},Eq:function(){return H},GZ:function(){return K},HQ:function(){return Q},Hq:function(){return q},IV:function(){return ie},Ig:function(){return ee},Jn:function(){return B},K0:function(){return Y},Kn:function(){return X},L9:function(){return ae},Qf:function(){return oe},RL:function(){return A},TS:function(){return F},Tq:function(){return de},UB:function(){return L},UE:function(){return W},_U:function(){return te},b1:function(){return G},b8:function(){return J},bY:function(){return ue},cn:function(){return ne},d8:function(){return M},dz:function(){return le},ej:function(){return D},gg:function(){return U},iC:function(){return se},lW:function(){return T},nS:function(){return ce},s7:function(){return Z},zs:function(){return V}});var n=r(22882),i=r.n(n),o=r(31734),a=r.n(o),s=r(71899),l=r.n(s),c=r(66397),u=r.n(c),d=r(8717),p=r.n(d),f=r(90899),h=r.n(f),m=r(86166),v=r.n(m),g=r(79131),_=r.n(g),y=r(49401),w=r.n(y),b=r(8005),x=r.n(b),E=r(9328),S=r(38920),C=r.n(S),j=(r(16948),r(1932)),I=r(65025),k=r(40305),N=r(62586),R=r(30810),P=function(e){if(e.image_url)return T((0,k.Y)(e.image_url));for(var t=["100","175","300","75","50","fallback"],r=0;r1&&n<30)r=t.days_ago.replace("{0}",n);else if(n>=30&&n<731){var i=n/30;r=t.months_ago.replace("{0}",Math.round(i))}else if(n>=731){var o=n/365;r=t.years_ago.replace("{0}",Math.round(o))}return r}}},H=function(e){var t=new Date;return Math.round(Math.abs((t.getTime()-e.getTime())/864e5))},K=function(e,t){if(window.scroll)return(0,j.Z)(e,t);var r=e.getBoundingClientRect();return window.scrollBy?window.scrollBy(0,r.top):void 0},G=function(){return"ontouchstart"in window||navigator.msMaxTouchPoints>0},Q=function(e){var t;return p()(t=h()(e).call(e,(function(e){var t=v()(e)||e.value;return void 0!==e.is_required?Y(t,e.is_required,e.validationType):void 0!==e.required?Y(t,e.required,e.validationType):void 0}))).call(t,(function(e,t){return e&&t}))},Y=function(e,t,r){var n=!0;return void 0!==e&&_()(e)&&(e=_()(e).call(e)),r&&!$(e,r)&&void 0!==e&&e.length>0&&(n=!1),t&&(void 0===e||e.length<=0)&&(n=!1),"object"==typeof e&&e.length>0&&e.forEach((function(e){e.value&&"Video"===e.value.composite_type&&(e.value.isValid||(n=!1))})),n},$=function(e,t){return t!==E.Z.EMAIL||"string"==typeof e&&-1!==w()(e).call(e,"@")},X=function(e,t){var r,n;if(null!==(r=window.POWERREVIEWS)&&void 0!==r&&null!==(n=r.common)&&void 0!==n&&n.getCallbacks){var i=window.POWERREVIEWS.common.getCallbacks();void 0!==i[e]&&i[e](t)}},J=function(e){var t=document.createElement("div");return e&&"string"==typeof e&&(e=(e=e.replace(/]*>([\S\s]*?)<\/script>/gim,"")).replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),t.innerHTML=e,e=t.textContent,t.textContent=""),e},ee=function(e){return e.charAt(0).toUpperCase()+x()(e).call(e,1).toLowerCase()},te=function(e){var t=document.getElementsByTagName("head")[0];t&&t.firstChild||t?t.appendChild(e):window.document.children[0].appendChild(e)},re=function(e,t){return new RegExp(" "+t+" ").test(" "+e.className+" ")},ne=function(e,t){re(e,t)||(e.className+=" "+t)},ie=function(e,t){var r=" "+e.className.replace(/[\t\r\n]/g," ")+" ";if(re(e,t)){for(;l()(r).call(r," "+t+" ")>=0;)r=r.replace(" "+t+" "," ");e.className=r.replace(/^\s+|\s+$/g,"")}},oe=I.h,ae=function(){var e=window.navigator.userAgent||navigator.userAgent,t={MAC:/Macintosh/,WIN:/Windows/,ANDROID:/Android/,IOS:/iP(hone|od|ad)/};for(var r in t)if(t[r].exec(e))return r;return"OTHER"},se=function(e,t,r){if(e.ugc_id&&e.passcode)return[e.ugc_id,e.passcode].join("-");var n=e.site_id?e.merchant_group_id+"-"+e.site_id:e.merchant_id;return[r||n,e.page_id,!0===N.V.getItem("reviewTranslationEnabled")?"all":t||e.locale].join("-")},le=function(e){return[e.site_id?e.merchant_group_id+"-"+e.site_id:e.merchant_id,e.merchant_user_email,e.page_ids].join("-")},ce=function(e){if(!e)return null;return e.match(/javascript\:/gi)?null:e},ue=function(e,t){return h()(t).call(t,(function(t){var r=i()({},t);if((0,R.$)(r.key)){var n=(0,R.$)(r.key);if("simple"===r.field_type)"numeric"!==r.answer_type||isNaN(Number(n))?"numeric"!==r.answer_type&&(r.value=decodeURIComponent(n.replace(/\+/g," "))):r.value=Number(n);else if("collection"===r.field_type){n.split(",").forEach((function(e){var t=e-1;r.choices[t]&&(r.choices[t].checked=!0,v()(r)||(r.values=[]),v()(r).push(r.choices[t]))}))}"name"===r.key&&e.params&&e.params.pr_reviewer_name&&(r.value=e.params.pr_reviewer_name,r.isVisible=!1),"location"===r.key&&e.params&&e.params.pr_reviewer_location&&(r.value=e.params.pr_reviewer_location,r.isVisible=!1)}return"email_collection"===r.key&&(r.id=r.key,r.validationType=E.Z.EMAIL),r}))},de=function(e,t){var r;return void 0===t&&(t=7),h()(r=e.split("")).call(r,(function(e){return String.fromCharCode(e.charCodeAt(0)+t)})).join("")}},72994:function(e,t,r){"use strict";r.d(t,{i:function(){return l}});var n=r(90899),i=r.n(n),o=r(79131),a=r.n(o),s=function(e){return e.toLowerCase()};function l(e,t){var r;return void 0===t&&(t=s),"string"==typeof e?i()(r=e.split(",")).call(r,(function(e){return t(a()(e).call(e))})):[]}},73049:function(e,t,r){"use strict";r.d(t,{D:function(){return o},X:function(){return a}});var n=r(69378),i=r.n(n);function o(e,t,r){var n;return function(){var i=this,o=arguments,a=function(){n=null,r||e.apply(i,o)},s=r&&!n;clearTimeout(n),n=setTimeout(a,t),s&&e.apply(i,o)}}function a(e,t,r){var n=[];return function(){for(var a=arguments.length,s=new Array(a),l=0;l1?t-1:0),n=1;n0?e.replace(/{\s*}/g,"{0}").replace(/{(\w+)}/g,(function(e,t){return null!=r[t]?r[t]:e})):e}r.d(t,{W:function(){return n}})},40305:function(e,t,r){"use strict";r.d(t,{Y:function(){return o}});var n=r(71899),i=r.n(n);function o(e){return 0===i()(e).call(e,"//")?"https:"+e:0===i()(e).call(e,"http://")?e.replace("http","https"):e}},59235:function(e,t,r){"use strict";r.d(t,{$A:function(){return c.$A},$s:function(){return u.$},D9:function(){return i.D},Ip:function(){return l.Ip},WU:function(){return a.W},iA:function(){return s.i},ub:function(){return o.u},vw:function(){return u.v},x0:function(){return n.x}});var n=r(57544),i=r(23745),o=(r(73049),r(2418)),a=r(49274),s=(r(40079),r(72994)),l=r(27353),c=r(29700),u=r(30810)},40079:function(e,t,r){"use strict";r.d(t,{s:function(){return o}});var n=r(79131),i=r.n(n);function o(e,t){var r=t.ENABLE_CONTENT_TRANSLATION,n=void 0!==r&&r,o=t.CONTENT_TRANSLATION_LANGUAGES,a=void 0===o?"":o;return!0===n&&("string"==typeof a&&""!==a&&a.split(",").some((function(t){return i()(t).call(t)===e})))}},46833:function(e,t,r){"use strict";r.d(t,{H:function(){return a},I:function(){return o}});var n=r(79131),i=r.n(n);function o(e){return!(!e||!/^[a-z][a-z]_\w/.test(e))}function a(e){if("string"==typeof e)switch(e=i()(e).call(e)){case"es_MX":case"zh_TW":case"zh_HK":case"fa_AF":case"fr_CA":return e.replace("_","-");default:var t=e.split("_");if(Array.isArray(t)&&t.length)return t[0]}}},48556:function(e,t,r){"use strict";r.d(t,{l:function(){return o}});var n=r(50381),i=r.n(n);function o(){for(var e=arguments.length,t=new Array(e),r=0;rn?t:e+(t-e)*((i=r/n)<.5?4*i*i*i:(i-1)*(2*i-2)*(2*i-2)+1);var i};return function(t,r,n,o){r=r||500,o=o||window;var a,s=window.pageYOffset;if("number"==typeof t)var l=i()(t);else l="HTML"===(a=t).nodeName?-window.pageYOffset:a.getBoundingClientRect().top+window.pageYOffset;var c=Date.now(),u=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,15)};!function i(){var a=Date.now()-c;o!==window?o.scrollTop=e(s,l,a,r):window.scroll(0,e(s,l,a,r)),a>r?"function"==typeof n&&n(t):u(i)}()}}}()},24286:function(e,t,r){"use strict";var n={};r.r(n),r.d(n,{dataTypes:function(){return ur},get:function(){return mr},getContent:function(){return hr},urlQueryConstructor:function(){return dr}});var i=r(29406),o=r.n(i),a=r(63353),s=r.n(a),l=r(97941),c=r.n(l),u=r(22882),d=r.n(u),p=r(22788),f=r.n(p),h=r(50381),m=r.n(h),v=r(42461),g=r.n(v),_=r(90899),y=r.n(_),w=r(8717),b=r.n(w),x=r(36004),E=r.n(x),S=r(33415),C=r.n(S),j=r(71899),I=r.n(j),k=r(98189),N=r.n(k),R="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==R&&R,P="URLSearchParams"in R,T="Symbol"in R&&"iterator"in Symbol,A="FileReader"in R&&"Blob"in R&&function(){try{return new Blob,!0}catch(e){return!1}}(),L="FormData"in R,O="ArrayBuffer"in R;if(O)var D=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],M=ArrayBuffer.isView||function(e){return e&&D.indexOf(Object.prototype.toString.call(e))>-1};function F(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function z(e){return"string"!=typeof e&&(e=String(e)),e}function V(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return T&&(t[Symbol.iterator]=function(){return t}),t}function q(e){this.map={},e instanceof q?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function W(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function U(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function Z(e){var t=new FileReader,r=U(t);return t.readAsArrayBuffer(e),r}function B(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function H(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:A&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:L&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:P&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():O&&A&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=B(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):O&&(ArrayBuffer.prototype.isPrototypeOf(e)||M(e))?this._bodyArrayBuffer=B(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):P&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},A&&(this.blob=function(){var e=W(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var e=W(this);return e||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(Z)}),this.text=function(){var e,t,r,n=W(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,r=U(t),t.readAsText(e),r;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),r=new Array(t.length),n=0;n-1?n:r),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var o=/([?&])_=[^&]*/;if(o.test(this.url))this.url=this.url.replace(o,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function Q(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var r=e.split("="),n=r.shift().replace(/\+/g," "),i=r.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(i))}})),t}function Y(e,t){if(!(this instanceof Y))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new q(t.headers),this.url=t.url||"",this._initBody(e)}G.prototype.clone=function(){return new G(this,{body:this._bodyInit})},H.call(G.prototype),H.call(Y.prototype),Y.prototype.clone=function(){return new Y(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new q(this.headers),url:this.url})},Y.error=function(){var e=new Y(null,{status:0,statusText:""});return e.type="error",e};var $=[301,302,303,307,308];Y.redirect=function(e,t){if(-1===$.indexOf(t))throw new RangeError("Invalid status code");return new Y(null,{status:t,headers:{location:e}})};var X=R.DOMException;try{new X}catch(e){(X=function(e,t){this.message=e,this.name=t;var r=Error(e);this.stack=r.stack}).prototype=Object.create(Error.prototype),X.prototype.constructor=X}function J(e,t){return new Promise((function(r,n){var i=new G(e,t);if(i.signal&&i.signal.aborted)return n(new X("Aborted","AbortError"));var o=new XMLHttpRequest;function a(){o.abort()}o.onload=function(){var e,t,n={status:o.status,statusText:o.statusText,headers:(e=o.getAllResponseHeaders()||"",t=new q,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).forEach((function(e){var r=e.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();t.append(n,i)}})),t)};n.url="responseURL"in o?o.responseURL:n.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;setTimeout((function(){r(new Y(i,n))}),0)},o.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},o.onabort=function(){setTimeout((function(){n(new X("Aborted","AbortError"))}),0)},o.open(i.method,function(e){try{return""===e&&R.location.href?R.location.href:e}catch(t){return e}}(i.url),!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),"responseType"in o&&(A?o.responseType="blob":O&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(o.responseType="arraybuffer")),!t||"object"!=typeof t.headers||t.headers instanceof q?i.headers.forEach((function(e,t){o.setRequestHeader(t,e)})):Object.getOwnPropertyNames(t.headers).forEach((function(e){o.setRequestHeader(e,z(t.headers[e]))})),i.signal&&(i.signal.addEventListener("abort",a),o.onreadystatechange=function(){4===o.readyState&&i.signal.removeEventListener("abort",a)}),o.send(void 0===i._bodyInit?null:i._bodyInit)}))}J.polyfill=!0,R.fetch||(R.fetch=J,R.Headers=q,R.Request=G,R.Response=Y);var ee=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r0},e.prototype.connect_=function(){te&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),oe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){te&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;ie.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),se=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),ye="undefined"!=typeof WeakMap?new WeakMap:new ee,we=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=ae.getInstance(),n=new _e(t,r,this);ye.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){we.prototype[e]=function(){var t;return(t=ye.get(this))[e].apply(t,arguments)}}));var be=void 0!==re.ResizeObserver?re.ResizeObserver:we;r(18360);window.ResizeObserver=window.ResizeObserver||be,void 0===N()&&(window.Promise=r(21803));var xe=r(2784),Ee=r(28316),Se=r(30810),Ce=r(26562),je=r.n(Ce),Ie="ReviewDisplay",ke="ReviewList",Ne="ReviewSnapshot",Re="ReviewSnippet",Pe="QuestionDisplay",Te="QuestionSnippet",Ae="WriteAReview",Le="WriteAQuestion",Oe="WriteAnAnswer",De="Write",Me="ReviewYourPurchases",Fe="SellerRatings",ze="WhydYouBuy",Ve="WhydYouBuyDisplay",qe="ReviewImageDisplay",We="ReviewImageSnippet",Ue="AddToCart",Ze="CategorySnippet",Be="IRLSnippet",He=Ie,Ke=ke,Ge=Ne,Qe=Re,Ye=Pe,$e=Te,Xe=Ae,Je=Le,et=Oe,tt=De,rt=Me,nt=Fe,it=ze,ot=Ve,at=qe,st=We,lt=Ue,ct=Ze,ut=Be,dt="Aggregate",pt="AggregateAndDetails";var ft="WAR",ht="REVIEW_DISPLAY",mt="REVIEW_LIST",vt="REVIEW_SNAPSHOT",gt="RYP",_t="SRW",yt="WAQWAA",wt="WYB",bt="WYB_DISPLAY",xt="QA_DISPLAY",Et="RID",St="REVIEW_SNIPPET",Ct="QA_SNIPPET",jt="IMAGE_SNIPPET",It="CATEGORY_SNIPPET",kt="IRL_SNIPPET",Nt=r(51519),Rt={api_key:"ec8f9acb-be0e-489b-a6ff-3eed3811025e",locale:"en_US",merchant_group_id:"49047",merchant_id:"512774",page_id:"7822949451"},Pt=r(18717);function Tt(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(i){return"function"==typeof i?i(r,n,e):t(i)}}}}var At=Tt();At.withExtraArgument=Tt;var Lt=At,Ot="HELPFUL",Dt="UNHELPFUL",Mt="PROFANE",Ft="WRONG_PRODUCT",zt="SPAM",Vt="DUPLICATE",qt="COPYRIGHT",Wt="NOT_REVIEW",Ut="CUSTOMER_IMAGE",Zt="OTHER",Bt=r(53304),Ht=function(e){var t,r,n,i,o,a=(t=function(t,r){return t(e.apply(void 0,r))},r=0,n=!0,o=[],function(e,a){var s=this,l=a[0]&&a[0].page_id,c=I()(o).call(o,l)>-1,u=n&&!i||!c;if(clearTimeout(i),i=setTimeout((function(){if(i=null,!n)return t.apply(s,[e,a])}),r),u)return o.push(l),t.apply(this,[e,a])});return function(){for(var e=arguments.length,t=new Array(e),r=0;r-1||I()(r=e.uri).call(r,"youtu.be")>-1)},Gt=function(e){var t;return m()(t=y()(e).call(e,(function(e){return d()(d()({},e),{},{image:e.uri},"video"===e.type&&{type:Kt(e)?"yt":"cvideo"})}))).call(t,(function(e){return"yt"!==e.type}))},Qt=r(49924),Yt=r.n(Qt),$t=r(23972),Xt=r.n($t),Jt=r(27369),er=r(20139),tr=r.n(er),rr=r(139),nr=r.n(rr),ir=r(62586),or=r(46833),ar=tr()(nr(),N()),sr=(0,Jt.fv)()||"https://display.powerreviews.com",lr=(0,Jt.fv)()||"https://origin-readservices-b2c-api.powerreviews.com",cr=function(e,t){return(0,Jt.fv)(e)?(0,Jt.fv)(e).b2cReadBase:t},ur={REVIEW:"review",QUESTION:"question",PRODUCT:"product",CATEGORY:"category"};function dr(e,t){var r=[],n=(0,Se.$)("nocache",t),i=t.page_id,o=t.review_id,a=t.read_services_base_url,s=t.sorts,l=t.merchant_id,c=m()(t),u=t.filters,d=t.locale,p=t.newFilters,f=t.pwrPageSize,h=t.category,v=t.hashtags,_=t.noConfig,w=""+cr(a,sr);!0===n&&(w=""+cr(a,lr),r.push("_nocache=true"));var x="en_US";if(!0===ir.V.getItem("reviewTranslationEnabled")&&"reviews"===e?(x="all",r.push("page_locale="+d)):(0,or.I)(d)&&(x=d),w+="/m/"+l+"/l/"+x,o?w+="/review/"+o+"?":(i&&(w+="/product/"+encodeURIComponent(i)),w+="/"+e+"?"),t.wdyb&&(w+="wdyb=true&"),s&&s.length>0){var E,S=y()(E=m()(s).call(s,(function(e){return"created_date"!==e.type||1===s.length}))).call(E,(function(e){if("string"==typeof e)return e;switch(e.type){case"rating":return"asc"===e.order?"LowestRating":"HighestRating";case"helpful_votes":return"MostHelpful";case"created_date":return"asc"===e.order?"Oldest":"Newest";case"answer_count":return"MostAnswers";case"mediasort":return"MediaSort";default:return null}})).join(",");r.push("sort="+S)}if(u&&Array.isArray(u)&&u.length>0)if(p){var C=[],j=b()(u).call(u,(function(e,t){return e[t.attribute]?e[t.attribute].push(t.value):e[t.attribute]=[t.value],e}),{});g()(j).forEach((function(e){"search"===e&&j[e][0].length?r.push("search="+encodeURIComponent(j[e][0])):"variant"===e?r.push("variant="+encodeURIComponent(j[e][0])):"native_only"===e?r.push("native_only="+encodeURIComponent(j[e][0])):C.push(e+":"+encodeURIComponent(j[e].join("||")))})),C.length&&r.push("filters="+C.join(","))}else{var I=[];u.forEach((function(e){if("search"===e.operation&&e.value.length)r.push("search="+encodeURIComponent(e.value));else if("="===e.operation){var t=e.value.length>1?e.value.join("||"):e.value;I.push(e.attribute+":"+encodeURIComponent(t))}else"variant"===e.operation&&I.push(e.attribute+":"+encodeURIComponent(e.value))})),I.length&&r.push("filters="+I.join(","))}return c&&r.push("filter="+c),f&&r.push("paging.size="+f),h&&r.push("category="+h),v&&r.push("hashtags="+v),!0===_&&r.push("_noconfig=true"),""+w+r.join("&")}var pr=function(e,t,r){if(!0===(0,Se.$)("api_authorization",r))return ar(e,t).set("Authorization",r.api_key).end();var n=t;return I()(n).call(n,"apikey")<0&&(I()(n).call(n,"?")<0&&(n+="?"),n+="&apikey="+r.api_key),ar(e,n)},fr={};function hr(e,t,r){var n=dr(e.toLowerCase(),t),i="number"==typeof r;if(i&&fr[n]){var o=fr[n],a=o.timestamp,s=o.error,l=o.payload;if(Date.now()-a0})}))}),_));case bn.Ys:return d()(d()({},e),{},((w={})[t.productKey]=d()(d()(d()({},e[t.productKey]),t.body),{},{message:t.body.message,isSubmitting:!1,submitError:!0,submitErrorType:yn.Z.FATAL_SUBMIT_REVIEW_FAILURE,submitErrorMessage:t.body.message,error:!0,isLoading:!1}),w));case bn.jM:return d()(d()({},e),{},((x={})[t.productKey]=d()(d()({},e[t.productKey]),{},{isSubmitting:!1}),x));case bn.yl:return d()(d()({},e),{},((S={})[t.productKey]=d()(d()({},e[t.productKey]),{},{fields:y()(E=e[t.productKey].fields).call(E,(function(e,r){var n=e;return t.data.index===r&&(n=d()(d()({},e),t.data.fieldUpdates)),n}))}),S));case bn.UT:return d()(d()({},e),{},((j={})[t.productKey]=d()(d()({},e[t.productKey]),{},{message:null,media:o()(C=[]).call(C,e[t.productKey].media,t.media)}),j));case bn.YO:var V,q,W,U=0,Z=0;return d()(d()({},e),{},((W={})[t.productKey]=d()(d()({},e[t.productKey]),{},{message:null,media:y()(V=m()(q=e[t.productKey].media).call(q,(function(e,r){return r!==t.index}))).call(V,(function(e){var t=e.type===_n.pX?U++:Z++,r=e.type===_n.pX?"videourl":"image";return d()(d()({},e),{},{meta:d()(d()({},e.meta),{},{id:"media_"+r+"_"+t,key:"media_"+r+"_"+t})})}))}),W));case bn.WL:var B,H,K,G=0,Q=0;return d()(d()({},e),{},((K={})[t.productKey]=d()(d()({},e[t.productKey]),{},{message:null,media:y()(B=y()(H=e[t.productKey].media).call(H,(function(e){var r,n=m()(r=t.media).call(r,(function(t){return t.id===e.id}));return n.length>0?d()(d()({},e),n[0]):e}))).call(B,(function(e){var t=e.type===_n.pX?G++:Q++,r=e.type===_n.pX?"videourl":"image";return d()(d()({},e),{},{meta:d()(d()({},e.meta),{},{id:"media_"+r+"_"+t,key:"media_"+r+"_"+t})})}))}),K));case bn.sz:return d()(d()({},e),{},((k={})[t.productKey]=d()(d()({},e[t.productKey]),{},{message:null,media:y()(I=e[t.productKey].media).call(I,(function(e,r){return r===t.index?d()(d()({},e),{},{caption:t.caption}):e}))}),k));case bn.L4:return d()(d()({},e),{},((R={})[t.productKey]=d()(d()({},e[t.productKey]),{},{message:null,media:y()(N=e[t.productKey].media).call(N,(function(e,r){if(r===t.index){var n=(e.rotation||0)+90;return 360===n&&(n=0),d()(d()({},e),{},{rotation:n})}return e}))}),R));case bn.L5:var Y=o()(P=[]).call(P,e[t.productKey].fields),$=d()({},Y[t.fieldIndex]),X=t.fileType===_n.pX?d()({},t.composite_data):{composite_data:t.composite_data};gn()($)[t.valueIndex]=d()(d()(d()({},gn()($)[t.valueIndex]),X),{},{isUploaded:!0});var J=gn()($).every((function(e){return e.isUploaded}))?wn.ly:wn.Bj;return Y[t.fieldIndex]=d()(d()({},$),{},{syncStatus:J}),d()(d()({},e),{},((T={})[t.productKey]=d()(d()({},e[t.productKey]),{},{fields:Y}),T));case bn.m2:return d()(d()({},e),{},((L={})[t.productKey]=d()(d()({},e[t.productKey]),{},{isLoading:!1,isSubmitting:!1,isComplete:!0,fields:y()(A=e[t.productKey].fields).call(A,(function(e){var t="composite"===e.field_type&&("Image"===e.composite_type||"Video"===e.composite_type||"NativeVideo"===e.composite_type);return d()(d()({},e),{},{isVisible:!t})}))}),L));default:return e}}var Sn=r(37389),Cn="WAQ_INITIAL_FETCH",jn="WAQ_INITIAL_FETCH_SUCCESS",In="WAQ_INITIAL_FETCH_ERROR",kn="WAA_INITIAL_FETCH",Nn="WAA_INITIAL_FETCH_SUCCESS",Rn="WAA_INITIAL_FETCH_ERROR",Pn="WAQ_SUBMIT",Tn="WAQ_SUBMIT_SUCCESS",An="WAQ_SUBMIT_ERROR",Ln="WAA_SUBMIT",On="WAA_SUBMIT_SUCCESS",Dn="WAA_SUBMIT_ERROR",Mn="WAQWAA_SET_SUBMIT_ERROR",Fn=function(e,t,r,n){void 0===n&&(n=!1);var i=(0,Nt.iC)(e)+("WAQ"===t?"_question":"_answer");return{type:Mn,productKey:i,errorMessage:r,fatalSubmitError:n}},zn=function(e){var t=(0,Nt.iC)(e)+"_question";return function(r){return r({type:Cn,productKey:t}),(0,Sn.eT)(e).then((function(e){var n;n=200===e.statusCode?jn:In,r({type:n,body:e.body,productKey:t})}))}},Vn=function(e,t,r){var n=(0,Nt.iC)(e)+"_answer"+(r?"_"+r:"");return function(r){return r({type:kn,productKey:n}),(0,Sn.iy)(d()(d()({},e),{},{component_type:t})).then((function(e){var t;t=200===e.statusCode?Nn:Rn,r({type:t,body:e.body,productKey:n})}))}},qn=function(e,t){var r=(0,Nt.iC)(e)+"_question";return function(n){return n({type:Pn,productKey:r}),(0,Sn.m0)(e,t).then((function(e){var t;return t=200===e.statusCode?Tn:An,n({type:t,body:e.body,productKey:r}),e}))}},Wn=function(e,t,r,n){var i=(0,Nt.iC)(e)+"_answer"+(n?"_"+n:"");return function(n){return n({type:Ln,productKey:i}),(0,Sn.dh)(d()(d()({},e),{},{component_type:t}),r).then((function(e){var t;return t=200===e.statusCode?On:Dn,n({type:t,body:e.body,productKey:i}),e}))}},Un={};function Zn(e,t){var r,n,i,o,a,s,l;switch(void 0===e&&(e=Un),t.type){case Cn:case kn:return d()(d()({},e),{},((r={})[t.productKey]=d()(d()({},e[t.productKey]),{},{isLoading:!0}),r));case jn:case Nn:return d()(d()({},e),{},((n={})[t.productKey]=d()(d()({},e[t.productKey]),{},{isLoading:!1},t.body),n));case In:case Rn:return d()(d()({},e),{},((i={})[t.productKey]=d()(d()({},e[t.productKey]),{},{isLoading:!1,fetchError:!0,errorMessage:t.body.message}),i));case Pn:case Ln:return d()(d()({},e),{},((o={})[t.productKey]=d()(d()({},e[t.productKey]),{},{isSubmitting:!0,field_errors:null,errorMessage:null,fatalSubmitError:!1}),o));case Tn:case On:return d()(d()({},e),{},((a={})[t.productKey]=d()(d()({},e[t.productKey]),{},{isSubmitting:!1,isComplete:!0},t.body),a));case An:case Dn:var c=t.body,u=c.detail,p=c.message,f={field_errors:u,errorMessage:p,fatalSubmitError:!u&&!p};return d()(d()({},e),{},((s={})[t.productKey]=d()(d()(d()({},e[t.productKey]),f),{},{isSubmitting:!1}),s));case Mn:return d()(d()({},e),{},((l={})[t.productKey]=d()(d()({},e[t.productKey]),{},{errorMessage:t.errorMessage,fatalSubmitError:t.fatalSubmitError}),l));default:return e}}var Bn=function(e,t){var r=t.product_information,n=t.progressive_info;if(n&&n.is_progressive_type&&n.current_step>0)return!1;var i=(0,Se.v)(),o=i.AUTOSUBMIT,a=void 0===o?"":o,s=i.RATING,l=i.HEADLINE,c=i.COMMENTS;if(!(a&&s&&l&&c))return!1;var u=decodeURIComponent(a).split(":"),d=u[0],p=u[1];return d===r.page_id&&p===(r.variant||"")},Hn="RYP_INITIAL_FETCH",Kn="RYP_INITIAL_FETCH_SUCCESS",Gn="RYP_INITIAL_FETCH_ERROR_MISSING_PARAMETERS",Qn="RYP_INITIAL_FETCH_ERROR_UNKNOWN",Yn="RYP_VALIDATE_FORM",$n="RYP_CLOSE",Xn="RYP_SUBMIT",Jn="RYP_SUBMIT_SUCCESS",ei="RYP_SUBMIT_ERROR_PROFANITY",ti="RYP_SUBMIT_ERROR_UNKNOWN",ri="RYP_UPDATE_FIELD",ni="RYP_UPDATE_MEDIA",ii={};function oi(e,t){var r,n,i,a,s,l,c,u,p,f,h,v,g,_,w,b,x,E,S,C;switch(void 0===e&&(e=ii),t.type){case Hn:return d()(d()({},e),{},((r={})[t.rypKey]={isLoading:!0,localizations:{},merchant_information:{},purchaser_information:null,purchases:null,error:null,isComplete:!1},r));case Kn:return d()(d()({},e),{},((n={})[t.rypKey]=d()(d()(d()({},e[t.rypKey]),{},{purchases:[]},t.body),{},{isLoading:!1,error:null,isAutoSubmitting:t.isAutoSubmitting}),n));case Gn:return d()(d()({},e),{},((i={})[t.rypKey]=d()(d()(d()({},e[t.rypKey]),t.body),{},{error:!0,isLoading:!1}),i));case Qn:return d()(d()({},e),{},((a={})[t.rypKey]=d()(d()(d()({},e[t.rypKey]),t.body),{},{error:!0,isLoading:!1}),a));case Yn:return d()(d()({},e),{},((l={})[t.rypKey]=d()(d()({},e[t.rypKey]),{},{purchases:y()(s=e[t.rypKey].purchases).call(s,(function(e,r){var n;return r===t.purchaseIndex?d()(d()({},e),{},{review_template:y()(n=e.review_template).call(n,(function(e){return d()(d()({},e),{},{isValid:!e.required||!!e.value})}))}):e}))}),l));case $n:return d()(d()({},e),{},((u={})[t.rypKey]=d()(d()({},e[t.rypKey]),{},{purchases:m()(c=e[t.rypKey].purchases).call(c,(function(e,r){return r!==t.purchaseIndex}))}),u));case Xn:return d()(d()({},e),{},((p={})[t.rypKey]=d()(d()({},e[t.rypKey]),{},{isLoading:!0}),p));case ei:var j={};return m()(f=y()(h=t.body.fields).call(h,(function(e){if("media_image"===e.id){var t=null;return e.fields&&e.fields.forEach((function(e){"caption"===e.key&&e.error_message&&(t=e.error_message)})),d()(d()({},e),{},{error_message:t,isValid:!t})}return d()(d()({},e),{},{isValid:!0,error_message:e.error_message||null})}))).call(f,(function(e){return!!e.error_message})).forEach((function(e){j[e.id]=e.error_message})),d()(d()({},e),{},((g={})[t.rypKey]=d()(d()({},e[t.rypKey]),{},{purchases:y()(v=e[t.rypKey].purchases).call(v,(function(e,r){var n,i;return r===t.purchaseIndex?d()(d()({},e),{},{review_template:o()(n=[]).call(n,y()(i=e.review_template).call(i,(function(e){return j[e.id]?d()(d()({},e),{},{error_message:j[e.id],isValid:!1}):d()(d()({},e),{},{isValid:!0,error_message:null})}))),isLoading:!1,isComplete:!1}):e})),message:t.body.message,isComplete:!1,isLoading:!1,isAutoSubmitting:!1}),g));case ti:return d()(d()({},e),{},((_={})[t.rypKey]=d()(d()(d()({},e[t.rypKey]),t.body),{},{error:!0,isComplete:!1,isLoading:!1,isAutoSubmitting:!1}),_));case ri:return d()(d()({},e),{},((b={})[t.rypKey]=d()(d()({},e[t.rypKey]),{},{purchases:y()(w=e[t.rypKey].purchases).call(w,(function(e,r){var n;return r===t.purchaseIndex?d()(d()({},e),{},{review_template:y()(n=e.review_template).call(n,(function(e){return e.id===t.fieldID?d()(d()({},e),t.fieldUpdates):e}))}):e}))}),b));case ni:return d()(d()({},e),{},((E={})[t.rypKey]=d()(d()({},e[t.rypKey]),{},{purchases:y()(x=e[t.rypKey].purchases).call(x,(function(e,r){var n;return r===t.purchaseIndex?d()(d()({},e),{},{review_template:y()(n=e.review_template).call(n,(function(e){if(e.id===t.fieldID){var r,n=y()(r=gn()(e)).call(r,(function(e,r){return r===t.valueIndex?d()(d()({},e),{},{composite_data:t.composite_data,isUploaded:!0}):e})),i=n.every((function(e){return e.isUploaded}));return d()(d()({},e),{},{values:n,syncStatus:i?wn.ly:wn.Bj})}return e}))}):e}))}),E));case Jn:var I=t.isComplete?{}:{review_template:t.body.fields,progressive_info:t.body.progressive_info};return d()(d()({},e),{},((C={})[t.rypKey]=d()(d()({},e[t.rypKey]),{},{isLoading:!1,isAutoSubmitting:!1,purchases:y()(S=e[t.rypKey].purchases).call(S,(function(e,r){return r===t.purchaseIndex?d()(d()(d()({},e),I),{},{isLoading:!1,isComplete:t.isComplete}):e}))}),C));default:return e}}var ai=function(e){return b()(e).call(e,(function(e,t){return"media_image"===t.id?gn()(t)&&gn()(t).forEach((function(t){e.push({composite_data:t.composite_data,composite_type:"Image",field_type:"composite",rotation:t.rotation,fields:[{field_type:"simple",input_type:"TextBox",key:"caption",value:t.caption}],id:t.key,key:t.key})})):e.push(t),e}),[])};var si="FETCH_IRL_MEDIA",li="FETCH_IRL_MEDIA_SUCCESS",ci="FETCH_IRL_MEDIA_ERROR",ui={media:[]};function di(e,t){var r;switch(void 0===e&&(e=ui),t.type){case si:return d()(d()({},e),{},{isLoading:!0});case li:var n=t.paging||{},i=n.page_size,a=void 0===i?0:i,s=n.total_results,l=void 0===s?0:s,c=n.next_page_url;return d()(d()({},e),{},{isLoading:!1,media:o()(r=[]).call(r,e.media,Gt(t.results)),localizations:e.localizations||t.configuration.localizations,merchantProperties:e.merchantProperties||t.configuration.properties,totalMedia:l,pageSize:a,nextPage:c});case ci:return d()(d()({},e),{},{isLoading:!1,error:!0});default:return e}}var pi=(0,Pt.qC)(window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__({name:"PRStore",instanceId:"prstore-1"}):function(e){return e})(Pt.MT),fi=function(){var e=(0,Pt.UY)({Reviews:Vr,Questions:$r,Answers:un,ActionHistory:pn,Redraw:mn,WriteAReview:En,WAQWAA:Zn,ReviewYourPurchases:oi,IRLSnippet:di});return(0,Pt.md)(Lt)(pi)((function(t,r){return"CLEAR_STORE"===r.type&&(t=void 0),e(t,r)}))},hi=fi(),mi=r(87480),vi=r.n(mi),gi=r(4792),_i=r(52322),yi=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){var e=this.props,t=e.config,r=e.merchantProperties,n=void 0===r?{}:r,i=e.productKey,o=e.rollup,a=void 0===o?{}:o,s=(0,Bt.x9)(t,n),l=s.showJSONLD,c=s.showMicrodata;return a.review_count?l||t.structured_data_product_id?null:c?(0,_i.jsx)("div",{itemScope:!0,itemProp:"itemReviewed",id:"pr-"+i,itemType:"http://schema.org/Product",children:(0,_i.jsx)("meta",{itemProp:"name",content:a.productName||i})}):null:null},t}(xe.Component),wi=(0,gi.$j)((function(e,t){var r=(0,Nt.iC)(t.config),n=e.Reviews[r];return d()(d()({},n),{},{productKey:r})}))(yi),bi=r(25380);function xi(e){var t=e.pageId,r=e.targetElement,n=(0,bi.dZ)(t,"ADD_TO_CART");return(0,xe.useEffect)((function(){if(r){var e=function(){return n("add-to-cart")};return r.addEventListener("click",e),function(){r.removeEventListener("click",e)}}})),null}var Ei,Si=r(16465),Ci=r.n(Si),ji=r(23650),Ii=r.n(ji),ki=r(8005),Ni=r.n(ki),Ri=r(21798),Pi=null!=(Ei=ir.V.getItem("feedless-product"))?Ei:{},Ti=Pi.pids,Ai=Pi.pidvs;null==Ti&&(Ti=new(Ci()),Ai=new(Ci()),ir.V.setItem("feedless-product",{pids:Ti,pidvs:Ai}));var Li="[Powerreviews] Feedless Product Catalog:";function Oi(e){var t=(0,Se.v)(e.config,!0,!0),r=(0,xe.useState)(!1),n=r[0],i=r[1],o=(0,bi.dZ)();return(0,xe.useEffect)((function(){var e;if(!0!==n&&Di(t)){var r=y()(e=function(e){var t,r,n,i,o=[];null!=e&&e.product&&o.push(e);(null==e||null===(t=e.product)||void 0===t||null===(r=t.variants)||void 0===r?void 0:r.length)>0&&Ni()(n=Yt()(i=e.product.variants).call(i,(function(){return.5-Math.random()}))).call(n,0,3).forEach((function(t){o.push(d()(d()({},e),{},{page_id_variant:t.page_id_variant,product:d()(d()({},e.product),t)}))}));return o}(t)).call(e,Fi);r.forEach((function(e){var r;if(null!=e.pageIdVariant)Ai.has(e.pageIdVariant)?r="Duplicated Product variant: "+e.pageIdVariant:Ai.add(e.pageIdVariant);else if(Ti.has(e.pageId)?r="Duplicated Product: "+e.pageId:Ti.add(e.pageId),Ti.size>1){var n=Ii()(gn()(Ti).call(Ti)).join(",");console.warn(Li,"Multiple Product definitions found on a single page: "+n+". For best practices visit https://help.powerreviews.com/Content/Implementation/Feedless.htm?tocpath=Implementation%7CAdd%20Product%20Data%7C_____1. ")}r?console.warn(Li,r):o(t.page_id,"FEEDLESS_PRODUCT_CATALOG",e)})),function(e,t){var r={merchant_id:e.merchant_id,merchant_group_id:e.merchant_group_id,site_id:e.site_id,page_id:e.page_id,page_id_variant:e.page_id_variant,product_brand_name:t.productBrandName,product_name:t.productName,product_description:t.productDescription,product_url:t.productUrl,product_image_url:t.productImageUrl,product_price:t.productPrice,product_category_name:t.productCategoryName,product_in_stock:t.productInStock,product_manufacturer_id:t.productManufacturerId,product_upc:t.productUpc,product_add_to_cart_url:t.productAddToCartUrl,asin:t.asin,best_buy_sku:t.bestBuySku,cool_blue_sku:t.coolBlueSku};Ri.x.setItem("currentProductInformation",r)}(t,r[0]),i(!0)}}),[n,t,o]),null}function Di(e){var t;return y()(t=["name","image_url","category_name","description"]).call(t,(function(t){return Mi(e,t)})).every(Boolean)}function Mi(e,t){var r=e.product,n=null;return r&&(n=r[t]),null==n&&(n=e["product_"+t]||e[("product_"+t).toUpperCase()]),n}function Fi(e){var t=function(t){return Mi(e,t)},r={pageId:e.page_id,pageIdVariant:e.page_id_variant,locale:e.locale,productBrandName:t("brand_name"),productName:t("name"),productDescription:t("description")?t("description").substr(0,300):null,productUrl:t("url"),productImageUrl:t("image_url"),productPrice:t("price"),productCategoryName:t("category_name"),productInStock:t("in_stock"),productManufacturerId:t("manufacturer_id"),productUpc:t("upc"),productAddToCartUrl:t("add_to_cart_url"),asin:t("asin"),bestBuySku:t("best_buy_sku"),coolBlueSku:t("cool_blue_sku")};return Boolean(e.site_id)?r.sid=e.site_id:r.mid=e.merchant_id,r}Oi.configHasProductData=Di;var zi=function(e){var t,r=!0,n=!1,i=[],o=function(e){e.hasOwnProperty("ENABLE_CONTENT_COLLECTION_MODAL")&&(r=e.ENABLE_CONTENT_COLLECTION_MODAL),e.hasOwnProperty("splitBypass")&&(t=e.splitBypass),e.hasOwnProperty("style_sheet")&&(n=!0);var o=e.components;if(o)for(var a in o)-1===I()(i).call(i,a)&&i.push(a)};return e.length?e.forEach(o):o(e),{keys:i,splitBypass:t,hasStyleSheet:n,ENABLE_CONTENT_COLLECTION_MODAL:r}},Vi=function(e,t,r){var n=(null!=r?r:"https://ui.powerreviews.com/tag-builds/10349/")+t,i=document.createElement("script");i.type="text/javascript",i.src=n;var o=document.getElementsByTagName("script")[0];o.parentNode.insertBefore(i,o)},qi=r(66397),Wi=r.n(qi),Ui=r(81277),Zi=r(82427),Bi=function(e){var t=(0,Ui.ZR)().CD4_ADA_HEADING_LEVEL,r=void 0===t?"OFF":t,n=/^h[0-6]$/i.test(r)?Wi()(r[1],10):-1;return(0,_i.jsx)(Zi.y5,{initialLevel:n,children:e.children})},Hi=function(e){var t=e.store,r=e.config,n=e.children;return(0,_i.jsx)(gi.zt,{store:t,children:(0,_i.jsx)(Ui.iV,{config:r,children:function(){return(0,_i.jsx)(bi.fy,{children:(0,_i.jsx)(Bi,{children:n})})}})})},Ki=function(e){var t=e.store,r=(e.config,e.children);return(0,_i.jsx)(gi.zt,{store:t,children:r})},Gi=r(54504),Qi=r(91034),Yi=r(66584),$i=r(73049),Xi=["components","__componentKey"];function Ji(e){var t=e||document.body,r=document.createElement("div");return r.className="p-w-r",t.appendChild(r),r}var eo=new Yi.I(["Write","WriteAReview","WriteAQuestion","WriteAnAnswer","SellerRatings","ReviewYourPurchases","WhydYouBuy"]);function to(e){return eo.has(e)}var ro=function(e,t){var r=function(e){if(t===gt)return[];if(t===kt)return["api_key","merchant_id"];if(to(e.__componentKey))return["page_id","merchant_group_id","merchant_id"];if(e.ugc_id&&e.passcode)return[];var r=["api_key","merchant_group_id","merchant_id","page_id"];return t===_t&&r.push("srwVariant"),r}(e),n=[];if(r.forEach((function(t){(0,Se.$)(t,e)||n.push(t)})),n.length>0)throw new Error("PowerReviews - the following required parameters are missing: "+n);if(e.product&&e.product.variants&&e.product.variants.length){var i,o=y()(i=e.product.variants).call(i,(function(e){if(!e.page_id_variant)throw new Error("PowerReviews - product variant does not contain page_id_variant property",e);return""+e.page_id_variant}));if(o.push(""+e.product.page_id_variant),m()(o).call(o,(function(e,t,r){return I()(r).call(r,e)===t})).length!==e.product.variants.length+1)throw new Error("PowerReviews - product variants defined in your configuration are not unique")}},no=function(e){var t="pr-style-override";if(e&&!document.getElementById(t)){var r=document.createElement("link");r.setAttribute("href",e),r.setAttribute("id",t),r.setAttribute("type","text/css"),r.setAttribute("rel","stylesheet"),Nt._U(r)}},io=function(e){return!0===(0,Se.$)("pr_enable_content_display_test_mode",e)?d()(d()({},e),Rt):e};function oo(e){var t;return m()(t=y()(e).call(e,(function(e){return e.__componentKey}))).call(t,Boolean).join(", ")}var ao=function(e){var t,r;if(Nt.RL(),window.showSmallPopup=function(e,t,r,n){var i={toolbar:"no",directories:"no",status:"no",menubar:"no",scrollbars:"yes",resizable:"yes",location:"yes",top:"200",left:"200"},o=[];for(var a in i)o.push(a+"="+(n&&n[a]||i[a]));o.join(",");var s=window.open(e,"_blank");window.focus&&s.focus()},window.POWERREVIEWS=d()(d()({},window.POWERREVIEWS),{},{UI_VERSION:"4.0",config:{},data:{get:function(e){return(0,Bt.FV)(hi,e)}},display:d()(d()({emitter:(null===(t=window.POWERREVIEWS)||void 0===t||null===(r=t.display)||void 0===r?void 0:r.emitter)||new Gi.Z},window.POWERREVIEWS.display),{},{unmount:function(e){window.POWERREVIEWS.display.emitter.emit("unmount",e)},redraw:function(){hi.dispatch({type:fn})}}),common:{gCallbacks:{},getCallbacks:function(){return this.gCallbacks}},attachEvent:{WAR:{onLoad:function(e){window.POWERREVIEWS.common.getCallbacks().LOADED=e},onComplete:function(e){window.POWERREVIEWS.common.getCallbacks().COMPLETE=e},onError:function(e){window.POWERREVIEWS.common.getCallbacks().SUBMISSION_ERROR=e}},WAQ:{onLoad:function(e){window.POWERREVIEWS.common.getCallbacks().WAQ_LOADED=e},onComplete:function(e){window.POWERREVIEWS.common.getCallbacks().WAQ_COMPLETE=e},onError:function(e){window.POWERREVIEWS.common.getCallbacks().WAQ_SUBMISSION_ERROR=e}},WAA:{onLoad:function(e){window.POWERREVIEWS.common.getCallbacks().WAA_LOADED=e},onComplete:function(e){window.POWERREVIEWS.common.getCallbacks().WAA_COMPLETE=e},onError:function(e){window.POWERREVIEWS.common.getCallbacks().WAA_SUBMISSION_ERROR=e}}}}),!window.POWERREVIEWS.stylesLoaded){var n=document.createElement("style");n.setAttribute("type","text/css");var i=document.createTextNode(".p-w-r {display: none;}");n.appendChild(i),Nt._U(n);var a=document.createElement("link");a.setAttribute("href","https://ui.powerreviews.com/tag-builds/10349/4.0/styles.css"),a.setAttribute("type","text/css"),a.setAttribute("rel","stylesheet"),Nt._U(a)}window.POWERREVIEWS.display.render=function(t){var r,n=zi(t),i=f()(n);if("ui.engine.js"!==window.POWERREVIEWS.display.engine&&!i.every((function(t){return m()(e).call(e,(function(e){return e.key===t}))[0]})))return window.POWERREVIEWS.display.renderQueue=t,window.POWERREVIEWS.display.engine="ui.engine.js",Vi(window.POWERREVIEWS.display.build,"4.0/ui.engine.js");if(!Array.isArray(t)&&0===g()(t.components||{}).length&&Oi.configHasProductData(t)){var a=Ji(),l="pr-root-"+t.merchant_id+"-"+t.locale;return a.setAttribute("data-pr-root","fp"),a.id=l,void Ee.render((0,_i.jsx)(Hi,{store:hi,config:t,children:(0,_i.jsx)(Oi,{config:t})}),a)}var u=y()(r=function(e){for(var t,r=[],n=function(){var e=t.value,n=g()(e.components||{});1===n.length?r.push(d()(d()({},e),{},{__componentKey:n[0]})):n.length>1&&n.forEach((function(t){var n;r.push(d()(d()({},e),{},{components:(n={},n[t]=e.components[t],n),__componentKey:t}))}))},i=c()(e);!(t=i()).done;)n();return r}(Array.isArray(t)?function(e,t){var r,n,i,a=y()(r=m()(t).call(t,(function(e){return e.dataRequirements===pt}))).call(r,(function(e){return e.key})),s=function(t){return m()(e).call(e,(function(e){var r,n=m()(r=g()(e.components)).call(r,(function(e){return I()(a).call(a,e)>-1})).length;return t?n>0:0===n}))},l=s(!0),c=s(!1),u=m()(c).call(c,(function(e){return e.components.hasOwnProperty(Qe)||e.components.hasOwnProperty(ct)})),p=m()(c).call(c,(function(e){return e.components.hasOwnProperty($e)})),f=function(e){for(var t=[],r=function(){var r,n=je()(e).call(e,0,10),i=m()(r=y()(n).call(n,(function(e){return e.page_id}))).call(r,(function(e){var t;return I()(t=y()(l).call(l,(function(e){return e.page_id}))).call(t,e)<0}));i.length>0&&(n=y()(n).call(n,(function(e){return d()(d()({},e),{},{batched_page_ids:i})}))),t.push.apply(t,n)};e.length>0;)r();return t},h=o()(n=[]).call(n,f(u),f(p));return o()(i=[]).call(i,l,h)}(t,e):[t])).call(r,Bt.DR),p=function(e){return b()(e).call(e,(function(e,t){t.components;var r,n=t.__componentKey,i=s()(t,Xi);return d()(d()(d()({},e),i),{},{__componentKeys:d()(d()({},e.__componentKeys),{},(r={},r[n]=n,r))})}),{})}(u),h=[],v=[],_=(0,Se.$)("pr_style_sheet",p,!0);if(_&&no(_),u.forEach((function(e){to(e.__componentKey)?h.push(e):v.push(e)})),h.length>1){var w=oo(h);throw new Error("[PowerReviews] the component(s) "+w+" cannot be rendered simultaneously.")}if(h.length>0&&v.length>0){var x=oo(v),S=oo(h);throw new Error('[Powerreviews] the components(s): "'+x+'" cannot be rendered simultaneously with "'+S+'"')}var j=b()(e).call(e,(function(e,t){return e.set(t.key,t),e}),new(E())),k=v.length?function(e,t,r){if(0===t.length)return null;for(var n,i=!1,o=[],a={},s=c()(t);!(n=s()).done;){var l=n.value;l=io(l);var u=e.get(l.__componentKey)||{},p=u.type,f=u.component;if(null!=p){var h=l.components[l.__componentKey],v=document.getElementById(h);if(null!=v)if(ro(l,p),i=i||p===ht||p===St||p===It||p===mt||p===vt,"ADD_TO_CART"!==p){if(!f)throw new Error("[Powerreviews] Unknown component: "+l.__componentKey+".");o.push({Component:f,props:{config:l,type:p},targetNode:v}),Oi.configHasProductData(l)&&(a[l.page_id]=l)}else o.push({Component:xi,props:{pageId:l.page_id,targetElement:v},targetNode:Ji()});else console.warn('[Powerreviews] It looks like an invalid element was specified: "'+h+'". Check your render config and make sure "'+h+'" exists on the page')}else console.warn('[Powerreviews] Invalid component detected: "'+l.__componentKey+'"')}return function(e){var t,r,n=e.config,s=e.emitter,l=(0,xe.useState)({}),c=l[0],u=l[1];return(0,xe.useEffect)((function(){var e=function(e){u((function(t){var r;return d()(d()({},t),{},((r={})[e]=e,r))}))};return s.on("unmount",e),function(){return s.off("unmount",e)}})),(0,_i.jsxs)(Hi,{store:hi,config:n,children:[y()(t=m()(o).call(o,(function(e){return!(e.targetNode.id in c)}))).call(t,(function(e){var t=e.Component,r=e.props,n=e.targetNode;return(0,_i.jsx)(Qi.C5,{targetNode:n,children:(0,_i.jsx)(t,d()({},r))},n.id)})),Ee.createPortal((0,_i.jsxs)("div",{className:"p-w-r",children:[i?(0,_i.jsx)(wi,{config:n}):null,y()(r=C()(a)).call(r,(function(e){return(0,_i.jsx)(Oi,{config:e},e.page_id)}))]}),Ji())]})}}(j,v):function(e,t,r){for(var n,i=[],o=c()(t);!(n=o()).done;){var a=n.value,s=e.get(a.__componentKey)||{},l=s.type,u=s.component;if(null!=l){var p=a.components[a.__componentKey],f=document.getElementById(p);if(null!=f){if(ro(a,l),!u)throw new Error("[Powerreviews] Unknown component: "+a.__componentKey+".");i.push({Component:u,props:{config:a,type:l},targetNode:f})}else console.warn('[Powerreviews] It looks like an invalid element was specified: "'+p+'". Check your render config and make sure "'+p+'" exists on the page')}else console.warn('[Powerreviews] Invalid component detected: "'+a.__componentKey+'"')}return function(e){var t,r=e.config,n=e.emitter,o=(0,xe.useState)({}),a=o[0],s=o[1];return(0,xe.useEffect)((function(){var e=function(e){s((function(t){var r;return d()(d()({},t),{},((r={})[e]=e,r))}))};return n.on("unmount",e),function(){return n.off("unmount",e)}})),(0,_i.jsx)(Ki,{store:hi,config:r,children:y()(t=m()(i).call(i,(function(e){return!(e.targetNode.id in a)}))).call(t,(function(e){var t=e.Component,r=e.props,n=e.targetNode;return(0,_i.jsx)(Qi.C5,{targetNode:n,children:(0,_i.jsx)(t,d()({},r))},n.id)}))})}}(j,h),N=Ji();N.setAttribute("data-pr-root",""),Ee.render((0,_i.jsx)(xe.Suspense,{fallback:(0,_i.jsx)("div",{"data-pr-state":"loading"}),children:(0,_i.jsx)(k,{config:p,emitter:window.POWERREVIEWS.display.emitter})}),N)},window.POWERREVIEWS.display.render=(0,$i.X)(window.POWERREVIEWS.display.render,250,!0);var l=window.POWERREVIEWS.display.renderQueue;l&&(window.POWERREVIEWS.display.render(l),window.POWERREVIEWS.display.renderQueue=null)},so={key:lt,type:"ADD_TO_CART",component:!1},lo=r(57101),co=r.n(lo),uo=r(22176),po=r.n(uo),fo=r(27353),ho=function(e,t,r){return{empty:{root:{},ratingValue:{},reviewCount:{}},root:{itemScope:!0,itemType:"http://schema.org/AggregateRating",itemRef:"pr-"+r},ratingValue:{itemProp:"ratingValue",content:e},reviewCount:{itemProp:"reviewCount",content:t}}},mo=r(72779),vo=r.n(mo),go=r(71376);function _o(e){return(Math.round(10*e)/10).toFixed(1)}var yo=xe.memo((function(e){var t=e.ratingFormatter,r=void 0===t?wo:t,n=e.ratingValue;return(0,_i.jsxs)("div",{className:vo()("pr-snippet-stars pr-snippet-stars-png",{"pr-snippet-stars-png-small":"SMALL"===e.starSize}),role:"img","aria-label":e.ratingLabel,children:[(0,_i.jsx)(go.Z,{isInteractive:!1,untoggledClassName:e.untoggledClassName,toggledClassName:e.toggledClassName,useQuarterStars:e.useQuarterStars,starSize:e.starSize,starStyles:e.starStyles,preset:e.ratingValue}),(0,_i.jsx)("div",{"aria-hidden":"true",className:"pr-snippet-rating-decimal",children:r(n)})]})}));function wo(e){return Math.round(10*e)/10}function bo(e){return(0,_i.jsx)(yo,d()(d()({},e),{},{ratingFormatter:_o}))}yo.defaultProps={className:"pr-snippet-star-rating",untoggledClassName:"pr-star",toggledClassName:"pr-star-selected",useQuarterStars:!1,starStyles:"GOLD_NON_ACCESSIBILITY_COMPLIANT",ratingValue:0,ratingMaxValue:5};var xo=yo,Eo=r(37320),So=r.n(Eo),Co=["children","type","id","parentID"],jo=function(e){function t(){return e.apply(this,arguments)||this}vi()(t,e);var r=t.prototype;return r.getChildJSON=function(e,t){var r,n=e.type,i=e.props,o=(i.children,i.type),a=i.id,l=i.parentID,c=s()(i,Co);l&&(c={"@id":l}),a&&(c=d()(d()({},c),{},{"@id":a}));var u=new n(e.props).getJSON(!!o||t,c);return o?So()(((r={})[o]=u,r)):u},r.parseChildren=function(e){var t,r=this;return void 0===e&&(e=!1),this.props.children?this.props.children.length>0?y()(t=this.props.children).call(t,(function(t){return r.getChildJSON(t,e)})):[this.getChildJSON(this.props.children,e)]:{}},r.render=function(){return null},t}(xe.Component),Io=jo,ko=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n,i;void 0===t&&(t=!1);var a=e.prototype.parseChildren.call(this),s=d()({"@type":"AggregateRating"},r);return t?So().apply(void 0,o()(n=[s]).call(n,a)):So().apply(void 0,o()(i=[{aggregateRating:s}]).call(i,a))},t}(Io),No=ko,Ro=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n,i;void 0===t&&(t=!1);var a=e.prototype.parseChildren.call(this),s=d()({"@type":"Person"},r);return t?So().apply(void 0,o()(n=[s]).call(n,a)):So().apply(void 0,o()(i=[{author:s}]).call(i,a))},t}(Io),Po=Ro,To=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(){if(this.props.children)return e.prototype.parseChildren.call(this,!0)},t}(Io),Ao=To,Lo=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n,i;void 0===t&&(t=!1);var a=e.prototype.parseChildren.call(this),s=d()({"@type":"AdministrativeArea"},r);return t?So().apply(void 0,o()(n=[s]).call(n,a)):So().apply(void 0,o()(i=[{locationCreated:s}]).call(i,a))},t}(Io),Oo=Lo,Do=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n,i;void 0===t&&(t=!1);var a=e.prototype.parseChildren.call(this),s=d()({"@type":"Product"},r);return t?So().apply(void 0,o()(n=[s]).call(n,a)):So().apply(void 0,o()(i=[{product:s}]).call(i,a))},t}(Io),Mo=Do,Fo=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n,i;void 0===t&&(t=!1);var a=e.prototype.parseChildren.call(this),s=d()({"@type":"Rating"},r);return t?So().apply(void 0,o()(n=[s]).call(n,a)):So().apply(void 0,o()(i=[{reviewRating:s}]).call(i,a))},t}(Io),zo=Fo,Vo=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n;void 0===t&&(t=!1);var i=e.prototype.parseChildren.call(this),a=d()({"@type":"Review"},r);return So().apply(void 0,o()(n=[a]).call(n,i))},t}(Io),qo=Vo,Wo=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){void 0===t&&(t=!1);var n=e.prototype.parseChildren.call(this,!0);if(n.length>1)throw new Error("The component can only contain a single child.");var i=d()(d()({},n[0]),r);return t?So()(i):So()({itemReviewed:i})},t}(Io),Uo=Wo,Zo=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n,i;void 0===t&&(t=!1);var a=e.prototype.parseChildren.call(this),s=d()({"@type":"Question"},r);return t?So().apply(void 0,o()(n=[s]).call(n,a)):So().apply(void 0,o()(i=[{question:s}]).call(i,a))},t}(Io),Bo=Zo,Ho=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){var n,i;void 0===t&&(t=!1);var a=e.prototype.parseChildren.call(this),s=d()({"@type":"Answer"},r);return t?So().apply(void 0,o()(n=[s]).call(n,a)):So().apply(void 0,o()(i=[{suggestedAnswer:s}]).call(i,a))},t}(Io),Ko=Ho,Go=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.getJSON=function(t,r){void 0===t&&(t=!1);var n=e.prototype.parseChildren.call(this,!0);return So()({"@graph":n})},t}(Io),Qo=Go,Yo=r(16948),$o=["children","type"],Xo=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){var e=null;if(this.props.children){var t,r=this.props.children.type,n=this.props.children.props,i=(n.children,n.type),o=s()(n,$o),a=new r(this.props.children.props).getJSON(!0,o);e="JSONLDNodeCollection"===r.name?So()({"@context":"http://schema.org/"},((t={})[i]=a,t)):So()({"@context":"http://schema.org/"},a)}return(0,_i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:Yo.ZP.stringify(e)}})},t}(xe.Component),Jo=r(59235),ea=["localizations","merchantProperties","features"],ta=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a1?(0,Jo.WU)((0,fo.ZP)(i,r),e):(0,fo.ZP)(o,r)},y=n.ENABLE_RATING_ONLY_COLLECTION?_(p,{singular:"review_display.4.0.common.rating_count_singular",plural:"review_display.4.0.common.rating_count_plural",none:"review_display.4.0.common.no_ratings"}):_(s,{singular:"review_display.4.0.common.review_count_singular",plural:"review_display.4.0.common.review_count_plural",none:"review_display.4.0.no_reviews"}),w=(0,fo.ZP)("review_display.4.0.common.rated_x_out_of_y",r),b=(0,Jo.WU)(w,_o(c)),x=h&&0!==s?!0===v?(0,_i.jsx)(Xo,{children:(0,_i.jsx)(Mo,{name:u||i,id:t.structured_data_product_id||i,children:(0,_i.jsx)(No,{ratingValue:c,reviewCount:s})})}):(0,_i.jsx)(Xo,{children:(0,_i.jsx)(No,{ratingValue:c,reviewCount:s,children:(0,_i.jsx)(Uo,{children:(0,_i.jsx)(Mo,{name:u,parentID:t.structured_data_product_id||i})})})}):null;return(0,_i.jsx)("section",{id:"pr-category-snippets-"+t.page_id,className:s?"":"pr-no-reviews","aria-labelledby":this.ratedLabelTextId,"data-testid":"category-snippet",children:(0,_i.jsxs)("div",d()(d()({},g.root),{},{className:"pr-snippet pr-category-snippet",children:[(0,_i.jsx)("div",d()(d()({},g.ratingValue),{},{className:"pr-category-snippet__rating pr-category-snippet__item",children:(0,_i.jsx)(bo,{isInteractive:!1,preset:c,ratingValue:c,useQuarterStars:!0,starStyles:(0,Se.$)("pr_star_styles",n,t),ratingLabel:b})})),(0,_i.jsx)("div",d()(d()({},g.reviewCount),{},{className:"pr-category-snippet__total pr-category-snippet__item",children:y})),x]}))})},t}(xe.Component),ra={getSnippets:Lr,getReviews:Ar},na=(0,gi.$j)((function(e,t){var r=(0,Nt.iC)(t.config),n=e.Reviews[r]||{},i=(n.localizations,n.merchantProperties,n.features,s()(n,ea));return d()(d()({},i),{},{productKey:r})}),ra)((function(e){var t=(0,xe.useContext)(Ui.E_),r=t.merchantProperties,n=t.localizations,i=t.displayApi;return(0,_i.jsx)(ta,d()({displayApi:i,merchantProperties:r,localizations:n},e))})),ia={key:ct,dataRequirements:dt,type:It,component:na},oa=r(31461),aa=r(7896),sa="data-focus-lock",la="data-focus-lock-disabled";function ca(e,t){return r=t,n=function(t){return e.forEach((function(e){return function(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}(e,t)}))},(i=(0,xe.useState)((function(){return{value:r,callback:n,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}}))[0]).callback=n,i.facade;var r,n,i}var ua={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},da=function(e){var t=e.children;return xe.createElement(xe.Fragment,null,xe.createElement("div",{key:"guard-first","data-focus-guard":!0,"data-focus-auto-guard":!0,style:ua}),t,t&&xe.createElement("div",{key:"guard-last","data-focus-guard":!0,"data-focus-auto-guard":!0,style:ua}))};da.propTypes={},da.defaultProps={children:null};var pa=function(){return pa=Object.assign||function(e){for(var t,r=1,n=arguments.length;r1?Aa(e[0],e):e[0]},Oa=function(e,t){return e.length>1?e.indexOf(Aa(e[t],e)):t},Da="NEW_FOCUS",Ma=function(e,t,r,n){var i=e.length,o=e[0],a=e[i-1],s=Ra(r);if(!(r&&e.indexOf(r)>=0)){var l,c,u=void 0!==r?t.indexOf(r):-1,d=n?t.indexOf(n):u,p=n?e.indexOf(n):-1,f=u-d,h=t.indexOf(o),m=t.indexOf(a),v=(l=t,c=new Set,l.forEach((function(e){return c.add(Aa(e,l))})),l.filter((function(e){return c.has(e)}))),g=(void 0!==r?v.indexOf(r):-1)-(n?v.indexOf(n):u),_=Oa(e,0),y=Oa(e,i-1);return-1===u||-1===p?Da:!f&&p>=0?p:u<=h&&s&&Math.abs(f)>1?y:u>=m&&s&&Math.abs(f)>1?_:f&&Math.abs(g)>1?p:u<=h?y:u>m?_:f?Math.abs(f)>1?p:(i+p+f)%i:void 0}},Fa=function(e){for(var t=Array(e.length),r=0;r=0})).sort(Va)},Wa=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"].join(","),Ua="".concat(Wa,", [data-focus-guard]"),Za=function(e,t){return e.reduce((function(e,r){return e.concat(Fa(r.querySelectorAll(t?Ua:Wa)),r.parentNode?Fa(r.parentNode.querySelectorAll(Wa)).filter((function(e){return e===r})):[])}),[])},Ba=function(e,t){return Fa(e).filter((function(e){return ja(t,e)})).filter((function(e){return function(e){return!((ka(e)||function(e){return"BUTTON"===e.tagName}(e))&&("hidden"===e.type||e.disabled)||e.ariaDisabled)}(e)}))},Ha=function(e,t,r){return qa(Ba(Za(e,r),t),!0,r)},Ka=function(e,t){return qa(Ba(Za(e),t),!1)},Ga=function(e,t){return Ba((r=e.querySelectorAll("[".concat("data-autofocus-inside","]")),Fa(r).map((function(e){return Za([e])})).reduce((function(e,t){return e.concat(t)}),[])),t);var r},Qa=function(e){return e.parentNode?Qa(e.parentNode):e},Ya=function(e){return za(e).filter(Boolean).reduce((function(e,t){var r=t.getAttribute(sa);return e.push.apply(e,r?function(e){for(var t=new Set,r=e.length,n=0;n0&&t.add(i),(o&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(n)}return e.filter((function(e,r){return!t.has(r)}))}(Fa(Qa(t).querySelectorAll("[".concat(sa,'="').concat(r,'"]:not([').concat(la,'="disabled"])')))):[t]),e}),[])},$a=function(){return document.activeElement?document.activeElement.shadowRoot?document.activeElement.shadowRoot.activeElement:document.activeElement:void 0},Xa=function(e,t){return void 0===t&&(t=[]),t.push(e),e.parentNode&&Xa(e.parentNode,t),t},Ja=function(e,t){for(var r=Xa(e),n=Xa(t),i=0;i=0)return o}return!1},es=function(e,t,r){var n=za(e),i=za(t),o=n[0],a=!1;return i.filter(Boolean).forEach((function(e){a=Ja(a||e,e)||a,r.filter(Boolean).forEach((function(e){var t=Ja(o,e);t&&(a=!a||t.contains(a)?t:Ja(t,a))}))})),a},ts=function(e,t){var r=document&&$a(),n=Ya(e).filter(Pa),i=es(r||e,e,n),o=new Map,a=Ka(n,o),s=Ha(n,o).filter((function(e){var t=e.node;return Pa(t)}));if(s[0]||(s=a)[0]){var l,c,u,d,p=Ka([i],o).map((function(e){return e.node})),f=(l=p,c=s,u=new Map,c.forEach((function(e){return u.set(e.node,e)})),l.map((function(e){return u.get(e)})).filter(Ta)),h=f.map((function(e){return e.node})),m=Ma(h,p,r,t);if(m===Da){var v=a.map((function(e){return e.node})).filter((d=function(e,t){return e.reduce((function(e,r){return e.concat(Ga(r,t))}),[])}(n,o),function(e){var t;return e.autofocus||!!(null===(t=Ia(e))||void 0===t?void 0:t.autofocus)||d.indexOf(e)>=0}));return{node:v&&v.length?La(v):La(h)}}return void 0===m?m:f[m]}},rs=0,ns=!1,is=function(e,t,r){void 0===r&&(r={});var n,i,o=ts(e,t);if(!ns&&o){if(rs>2)return console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),ns=!0,void setTimeout((function(){ns=!1}),1);rs++,n=o.node,i=r.focusOptions,"focus"in n&&n.focus(i),"contentWindow"in n&&n.contentWindow&&n.contentWindow.focus(),rs--}},os=function(e){return Boolean(Fa(e.querySelectorAll("iframe")).some((function(e){return e===document.activeElement})))},as=function(e){var t=document&&$a();return!(!t||t.dataset&&t.dataset.focusGuard)&&Ya(e).reduce((function(e,r){return e||r.contains(t)||os(r)}),!1)};function ss(e){var t=window.setImmediate;void 0!==t?t(e):setTimeout(e,1)}var ls=function(){return document&&document.activeElement===document.body||!!(e=document&&$a())&&Fa(document.querySelectorAll("[".concat("data-no-focus-lock","]"))).some((function(t){return t.contains(e)}));var e},cs=null,us=null,ds=null,ps=!1,fs=function(){return!0};function hs(e,t,r,n){var i=null,o=e;do{var a=n[o];if(a.guard)a.node.dataset.focusAutoGuard&&(i=a);else{if(!a.lockItem)break;if(o!==e)return;i=null}}while((o+=r)!==t);i&&(i.node.tabIndex=0)}var ms=function(e){return e&&"current"in e?e.current:e},vs=function e(t,r,n){return r&&(r.host===t&&(!r.activeElement||n.contains(r.activeElement))||r.parentNode&&e(t,r.parentNode,n))},gs=function(){var e,t,r,n,i,o,a,s=!1;if(cs){var l=cs,c=l.observed,u=l.persistentFocus,d=l.autoFocus,p=l.shards,f=l.crossFrame,h=l.focusOptions,m=c||ds&&ds.portaledElement,v=document&&document.activeElement;if(m){var g=[m].concat(p.map(ms).filter(Boolean));if(v&&!function(e){return(cs.whiteList||fs)(e)}(v)||(u||(f?Boolean(ps):"meanwhile"===ps)||!ls()||!us&&d)&&(m&&!(as(g)||v&&function(e,t){return t.some((function(t){return vs(e,t,t)}))}(v,g)||(a=v,ds&&ds.portaledElement===a))&&(document&&!us&&v&&!d?(v.blur&&v.blur(),document.body.focus()):(s=is(g,us,{focusOptions:h}),ds={})),ps=!1,us=document&&document.activeElement),document){var _=document&&document.activeElement,y=(t=Ya(e=g).filter(Pa),r=es(e,e,t),n=new Map,i=Ha([r],n,!0),o=Ha(t,n).filter((function(e){var t=e.node;return Pa(t)})).map((function(e){return e.node})),i.map((function(e){var t=e.node;return{node:t,index:e.index,lockItem:o.indexOf(t)>=0,guard:Ra(t)}}))),w=y.map((function(e){return e.node})).indexOf(_);w>-1&&(y.filter((function(e){var t=e.guard,r=e.node;return t&&r.dataset.focusAutoGuard})).forEach((function(e){return e.node.removeAttribute("tabIndex")})),hs(w,y.length,1,y),hs(w,-1,-1,y))}}}return s},_s=function(e){gs()&&e&&(e.stopPropagation(),e.preventDefault())},ys=function(){return ss(gs)},ws=function(e){var t=e.target,r=e.currentTarget;r.contains(t)||(ds={observerNode:r,portaledElement:t})},bs=function(){ps="just",setTimeout((function(){ps="meanwhile"}),0)};va.assignSyncMedium(ws),ga.assignMedium(ys),_a.assignMedium((function(e){return e({moveFocusInside:is,focusInside:as})}));var xs=Sa((function(e){return e.filter((function(e){return!e.disabled}))}),(function(e){var t=e.slice(-1)[0];t&&!cs&&(document.addEventListener("focusin",_s),document.addEventListener("focusout",ys),window.addEventListener("blur",bs));var r=cs,n=r&&t&&t.id===r.id;cs=t,r&&!n&&(r.onDeactivation(),e.filter((function(e){return e.id===r.id})).length||r.returnFocus(!t)),t?(us=null,n&&r.observed===t.observed||t.onActivation(),gs(),ss(gs)):(document.removeEventListener("focusin",_s),document.removeEventListener("focusout",ys),window.removeEventListener("blur",bs),us=null)}))((function(){return null})),Es=xe.forwardRef((function(e,t){return xe.createElement(xa,(0,aa.Z)({sideCar:xs,ref:t},e))})),Ss=xa.propTypes||{};Ss.sideCar,(0,oa.Z)(Ss,["sideCar"]);Es.propTypes={};var Cs=Es,js=function(e){return(0,_i.jsx)("span",{className:"pr-cross-icon",children:(0,_i.jsx)("svg",{viewBox:"9.5 9.5 21 21",focusable:"false",children:(0,_i.jsxs)("g",{className:"pr-cross-icon__group",children:[e.circleOutline&&(0,_i.jsx)("circle",{className:"pr-cross-icon__circle",cx:"20",cy:"20",r:"10",stroke:e.strokeColor,strokeWidth:e.circleStrokeSize,fill:e.fillColor}),(0,_i.jsx)("line",{className:"pr-cross-icon__line",x1:"15",y1:"15",x2:"25",y2:"25",stroke:e.strokeColor,strokeWidth:e.lineStrokeSize}),(0,_i.jsx)("line",{className:"pr-cross-icon__line",x1:"25",y1:"15",x2:"15",y2:"25",stroke:e.strokeColor,strokeWidth:e.lineStrokeSize})]})})})};js.defaultProps={circleOutline:!0,fillColor:"none",strokeColor:"#333",lineStrokeSize:"2",circleStrokeSize:"1"};var Is=js,ks=["children","enableCloseButton","enableBackgroundClose","localizations","handleClose","isCard","className"],Ns=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a'}})},Ts=["showWhite","className"],As=function(e){var t=e.showWhite,r=e.className,n=s()(e,Ts);return(0,_i.jsx)("svg",d()(d()({viewBox:"0 0 256 256",focusable:"false"},n),{},{className:vo()("pr-icon pr-icon-instagram pr-instagram-icon",r),children:(0,_i.jsx)("g",{children:(0,_i.jsx)("path",{fill:t?"white":"#0A0A08",d:"M128,23.1c34.2,0,38.2,0.1,51.7,0.7c12.5,0.6,19.3,2.7,23.8,4.4c6,2.3,10.2,5.1,14.7,9.6s7.3,8.7,9.6,14.7 c1.8,4.5,3.8,11.3,4.4,23.8c0.6,13.5,0.7,17.5,0.7,51.7s-0.1,38.2-0.7,51.7c-0.6,12.5-2.7,19.3-4.4,23.8c-2.3,6-5.1,10.2-9.6,14.7 c-4.5,4.5-8.7,7.3-14.7,9.6c-4.5,1.8-11.3,3.8-23.8,4.4c-13.5,0.6-17.5,0.7-51.7,0.7s-38.2-0.1-51.7-0.7 c-12.5-0.6-19.3-2.7-23.8-4.4c-6-2.3-10.2-5.1-14.7-9.6c-4.5-4.5-7.3-8.7-9.6-14.7c-1.8-4.5-3.8-11.3-4.4-23.8 c-0.6-13.5-0.7-17.5-0.7-51.7s0.1-38.2,0.7-51.7c0.6-12.5,2.7-19.3,4.4-23.8c2.3-6,5.1-10.2,9.6-14.7s8.7-7.3,14.7-9.6 c4.5-1.8,11.3-3.8,23.8-4.4C89.8,23.2,93.8,23.1,128,23.1 M128,0C93.2,0,88.9,0.1,75.2,0.8C61.6,1.4,52.3,3.6,44.2,6.7 c-8.4,3.3-15.6,7.6-22.7,14.8S10,35.7,6.7,44.2c-3.2,8.1-5.3,17.4-5.9,31.1C0.1,88.9,0,93.2,0,128s0.1,39.1,0.8,52.8 c0.6,13.6,2.8,22.9,5.9,31.1c3.3,8.4,7.6,15.6,14.8,22.7c7.1,7.1,14.3,11.5,22.7,14.8c8.1,3.2,17.4,5.3,31.1,5.9 c13.7,0.6,18,0.8,52.8,0.8s39.1-0.1,52.8-0.8c13.6-0.6,22.9-2.8,31.1-5.9c8.4-3.3,15.6-7.6,22.7-14.8c7.1-7.1,11.5-14.3,14.8-22.7 c3.2-8.1,5.3-17.4,5.9-31.1c0.6-13.7,0.8-18,0.8-52.8s-0.1-39.1-0.8-52.8c-0.6-13.6-2.8-22.9-5.9-31.1c-3.3-8.4-7.6-15.6-14.8-22.7 S220.3,10,211.8,6.7c-8.1-3.2-17.4-5.3-31.1-5.9C167.1,0.1,162.8,0,128,0z M128,62.3c-36.3,0-65.7,29.4-65.7,65.7 s29.4,65.7,65.7,65.7s65.7-29.4,65.7-65.7S164.3,62.3,128,62.3z M128,170.7c-23.6,0-42.7-19.1-42.7-42.7s19.1-42.7,42.7-42.7 s42.7,19.1,42.7,42.7S151.6,170.7,128,170.7z M211.7,59.7c0,8.5-6.9,15.4-15.4,15.4S181,68.2,181,59.7s6.9-15.4,15.4-15.4 S211.7,51.2,211.7,59.7z"})})}))};As.defaultProps={showWhite:!1};var Ls=As,Os=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){return(0,_i.jsx)("svg",d()(d()({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"17",focusable:"false"},this.props),{},{children:(0,_i.jsxs)("g",{fill:"#767676",fillRule:"evenodd",children:[(0,_i.jsx)("path",{d:"M17.022 0L2.68 4.246 0 12.005 6.659 17 21 12.77 17.022 0zM2.015 11.422l2.014-5.827L15.88 2.08l2.987 9.574L7.017 15.17l-5.002-3.747z"}),(0,_i.jsx)("path",{d:"M3.889 10.045c.43 0 .778.346.778.773a.775.775 0 0 1-.778.773.775.775 0 0 1-.778-.773c0-.427.348-.773.778-.773"})]})}))},t}(xe.Component),Ds=Os,Ms=r(57544),Fs=function(e){var t=e.productImageUrl,r=e.productName,n=e.productUrl,i=e.localizations,o=r?r+" "+(0,fo.ZP)("cd.common.media.product_image",i):(0,fo.ZP)("cd.common.media.product_image",i);return(0,_i.jsx)("li",{className:"pr-shoppable__list-item",children:(0,_i.jsxs)("a",{className:"pr-shoppable pr-shoppable__anchor",href:n,children:[t?(0,_i.jsx)("img",{className:"pr-shoppable__image",alt:o,src:(0,Nt.lW)(t,"d_common:shopping-tag-grey-background.svg,c_fit,w_40,h_40")}):null,r&&(0,_i.jsx)("span",{className:"pr-shoppable__text",children:r})]})})},zs=function(e){var t,r=e.showShoppableLink,n=e.media,i=e.localizations,o=n.product_image_url,a=n.product_name,s=n.product_url,l=(0,xe.useRef)((0,Ms.x)()).current;return null==a&&null==o?null:s&&r?(0,_i.jsxs)("section",{"aria-labelledby":l,children:[(0,_i.jsxs)(Zi.X6,{id:l,className:"pr-shop-all",importance:1,children:[(0,_i.jsx)(Ds,{"aria-hidden":"true"}),(0,fo.ZP)("review_display.4.0.modal.shop_all",i)]}),(0,_i.jsxs)("ul",{className:"pr-shoppable__list",children:[(0,_i.jsx)(Fs,{productImageUrl:o,productName:a,localizations:i,productUrl:s}),n.associated_products?y()(t=n.associated_products).call(t,(function(e,t){return(0,_i.jsx)(Fs,{productImageUrl:e.product_image_url,productName:e.product_name,localizations:i,productUrl:e.product_url},e.product_url+"-"+t)})):null]})]}):null},Vs=r(33093),qs=r.n(Vs),Ws=function(e){var t=e.thumbDirection,r=e.thumbColor,n="up"===t?"pr-thumbs-icon pr-thumbs-icon-up":"pr-thumbs-icon pr-thumbs-icon-down";return(0,_i.jsx)("span",{className:n,children:(0,_i.jsx)("svg",{version:"1.1",x:"0px",y:"0px",viewBox:"0 0 216 146",xmlSpace:"preserve",focusable:"false","aria-hidden":"true",children:(0,_i.jsxs)("g",{children:[(0,_i.jsx)("path",{className:"pr-thumbs-fill",fill:r,d:"M168.7,79.9c3-3.4,4.5-7.5,4.5-12.1c0-4.2-1.6-7.9-4.6-11c-3.1-3.1-6.8-4.6-11-4.6H135 c0.2-0.8,0.4-1.4,0.7-2s0.5-1.1,0.9-1.8s0.7-1.1,0.8-1.5c1-1.8,1.7-3.4,2.2-4.6c0.5-1.2,1-2.8,1.5-4.9c0.5-2.1,0.8-4.1,0.8-6.2 c0-1.3,0-2.4,0-3.2c0-0.8-0.2-2-0.4-3.7c-0.2-1.6-0.6-3-1-4.1c-0.4-1.1-1.1-2.3-2-3.7c-0.9-1.4-2-2.5-3.3-3.3s-2.9-1.5-4.9-2.1 c-2-0.6-4.2-0.9-6.7-0.9c-1.4,0-2.6,0.5-3.7,1.5c-1.1,1.1-2,2.4-2.8,4.1c-0.8,1.6-1.3,3-1.6,4.2c-0.3,1.2-0.6,2.9-1,5 c-0.5,2.3-0.9,3.9-1.1,4.9c-0.2,1-0.7,2.3-1.4,4c-0.7,1.6-1.5,2.9-2.5,3.9c-1.8,1.8-4.5,5.1-8.2,9.8c-2.7,3.5-5.4,6.8-8.2,9.9 c-2.8,3.1-4.9,4.7-6.2,4.8c-1.4,0.1-2.5,0.7-3.5,1.7s-1.5,2.2-1.5,3.5v52.2c0,1.4,0.5,2.6,1.5,3.6s2.3,1.5,3.7,1.6 c1.9,0.1,6.2,1.2,12.9,3.6c4.2,1.4,7.5,2.5,9.8,3.2c2.4,0.7,5.7,1.5,9.9,2.4c4.2,0.8,8.1,1.3,11.7,1.3h1.4h6.2h2.9 c7.2-0.1,12.6-2.2,16.1-6.4c3.1-3.7,4.5-8.7,4-14.7c2.1-2,3.6-4.6,4.4-7.7c0.9-3.3,0.9-6.5,0-9.5c2.5-3.3,3.7-7,3.5-11.2 C169.9,84.4,169.5,82.3,168.7,79.9z"}),(0,_i.jsx)("path",{className:"pr-thumbs-cuff-fill",fill:r,d:"M71.5,62.6H48c-1.4,0-2.6,0.5-3.7,1.5s-1.5,2.3-1.5,3.7v52.1c0,1.4,0.5,2.6,1.5,3.7c1,1,2.3,1.5,3.7,1.5 h23.5c1.4,0,2.6-0.5,3.7-1.5c1-1,1.5-2.3,1.5-3.7V67.8c0-1.4-0.5-2.6-1.5-3.7C74.1,63.1,72.9,62.6,71.5,62.6z M62.1,113.2 c-1,1-2.3,1.5-3.7,1.5c-1.5,0-2.7-0.5-3.7-1.5c-1-1-1.5-2.2-1.5-3.7c0-1.4,0.5-2.6,1.5-3.7c1-1,2.2-1.5,3.7-1.5 c1.4,0,2.6,0.5,3.7,1.5c1,1,1.5,2.3,1.5,3.7C63.7,111,63.2,112.2,62.1,113.2z"})]})})})};Ws.defaultProps={thumbDirection:"up",thumbColor:"#707070"};var Us=Ws,Zs=["voted","votedLabel","votedMessage","children","aria-describedby","className"];function Bs(e,t,r,n){var i=qs()(e).call(e,r),o=i?t+1:t;return{voted:i,count:o,label:n(o)}}function Hs(e){var t,r=e.voted,n=e.votedLabel,i=e.votedMessage,o=e.children,a=e["aria-describedby"],l=e.className,c=s()(e,Zs),u=(0,Jo.D9)(r),p=(0,xe.useRef)((0,Jo.x0)()),f=r?p.current+" "+a:a;return(0,xe.useEffect)((function(){!1===u&&!0===r&&(0,Jo.ub)(i)})),(0,_i.jsxs)("div",d()(d()({className:vo()("pr-helpful-voting",l),role:"group"},c),{},{children:[r?(0,_i.jsx)("span",{className:"pr-accessible-text",id:p.current,children:n}):null,y()(t=xe.Children).call(t,o,(function(e){return xe.cloneElement(e,{"aria-describedby":f,"aria-disabled":!0===r||void 0})}))]}))}function Ks(e){var t=e.type,r=e.voted,n=e.count,i=void 0===n?0:n,o=e["aria-label"],a=e["aria-describedby"],s=e["aria-disabled"],l=e.onClick;return(0,_i.jsxs)("button",{type:"button","aria-label":o,"aria-pressed":r,"aria-describedby":a,className:vo()("pr-helpful-btn",{"pr-helpful-yes":t===Ot,"pr-helpful-no":t===Dt,"pr-helpful-active":r}),"aria-disabled":s,onClick:function(){return s?null:l(t)},children:[(0,_i.jsx)(Us,{thumbDirection:t===Ot?"up":"down"}),(0,_i.jsx)("span",{className:"pr-helpful-count",children:i})]})}var Gs=r(29700),Qs=["src"],Ys=["src"];function $s(e){var t=e.src,r=s()(e,Qs),n=(0,Gs.Js)(t,"jpg");return(0,_i.jsxs)("picture",{children:[(0,_i.jsx)("source",{type:"image/webp",srcSet:(0,Gs.Js)(t,".webp")}),(0,_i.jsx)("source",{type:"image/jxr",srcSet:(0,Gs.Js)(t,".jxr")}),(0,_i.jsx)("img",d()(d()({alt:r.alt},r),{},{ref:function(e){e&&e.src!==n&&(e.src=n)}}))]})}function Xs(e){var t=e.src,r=s()(e,Ys);return(0,_i.jsxs)("video",d()(d()({},r),{},{children:[(0,_i.jsx)("source",{type:"video/webm",src:(0,Gs.Js)(t,".webm")}),(0,_i.jsx)("source",{type:"video/mp4",src:(0,Gs.Js)(t,".mp4")})]}))}$s.urlFromMedia=function(e,t,r){void 0===r&&(r={});var n="number"==typeof t?{height:t,width:t}:t,i=n.height,o=n.width;return r=d()(d()({},r),{},{height:i,width:o,format:null}),"cvideo"===e.type?Gs.ZP.libraryVideoUrl(e.image,r):Gs.ZP.libraryUrl(e.image,r)};var Js=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a-1,b=_.voted||y.voted;return(0,_i.jsxs)("footer",{className:"pr-media-card-footer",children:[(0,_i.jsxs)("div",{className:"pr-media-card-footer-sect1",children:[(0,_i.jsx)(zs,d()(d()({},r.props),{},{footer:!0})),g&&c&&(0,_i.jsx)("div",{className:"pr-media-card-footer-helpful-action",children:(0,_i.jsxs)(Hs,{voted:b,votedLabel:(0,fo.ZP)("review_display.4.0.helpful.already_voted",t),votedMessage:(0,fo.ZP)("review_display.4.0.helpful.thank_you",t),children:[(0,_i.jsx)(Ks,{type:Ot,voted:_.voted,count:_.count,"aria-label":_.label,onClick:function(){return s(f,Ot)}}),(0,_i.jsx)(Ks,{type:Dt,voted:y.voted,count:y.count,"aria-label":y.label,onClick:function(){return s(f,Dt)}})]})})]}),(0,_i.jsx)("div",{className:"pr-media-card-footer-sect2",children:g&&(0,_i.jsx)("div",{className:"pr-media-card-footer-flagging",children:w?(0,_i.jsxs)("div",{className:"pr-media-card-footer-flagging-isflagged",children:[(0,_i.jsx)(Ps,{}),(0,_i.jsx)("p",{className:"pr-flag-image-thankyou",children:(0,fo.ZP)("review_display.4.0.modal.is_flagged",t)})]}):(0,_i.jsx)("a",{href:"#",tabIndex:u?"0":"-1",role:"button",onClick:function(e){return l(e,f)},children:(0,fo.ZP)("review_display.4.0.modal.flag_image",t)})})})]})})),r}vi()(t,e);var r=t.prototype;return r.renderCardContent=function(e,t){var r=this;return(0,_i.jsxs)("div",{className:"pr-media-card-content-text",children:[e.rating&&(0,_i.jsx)("div",{className:"pr-media-card-content-text-stars",children:(0,_i.jsx)(xo,{ratingValue:e.rating,fullStarType:"starFillOrange",emptyStarType:"starStrokeOrange",localizations:{}})}),e.headline&&(0,_i.jsx)("p",{className:"pr-media-card-content-text-headline",children:e.headline}),this.props.allowReadReview&&e.review_id&&(0,_i.jsx)("button",{className:"pr-media-card-content-text-readreview",type:"button",onClick:function(){return r.props.onReadReviewFromGallery(e.review_id)},disabled:!this.props.primarySlide,children:(0,fo.ZP)("review_display.4.0.modal.read_review",t)}),(e.comments||e.caption)&&(0,_i.jsxs)("p",{className:"pr-media-card-content-text-comments",children:['"',e.comments||e.caption,'"']}),e.created_date&&(0,_i.jsx)("p",{className:"pr-media-card-content-text-date",children:(0,Nt.Jn)(e.created_date,{day_ago:(0,fo.ZP)("review_display.4.0.common.day_ago",t),days_ago:(0,fo.ZP)("review_display.4.0.common.days_ago",t),month_ago:(0,fo.ZP)("review_display.4.0.common.month_ago",t),months_ago:(0,fo.ZP)("review_display.4.0.common.months_ago",t),year_ago:(0,fo.ZP)("review_display.4.0.common.year_ago",t),years_ago:(0,fo.ZP)("review_display.4.0.common.years_ago",t)})}),e.disclosure_code&&(0,_i.jsx)("p",{className:"pr-media-card-content-text-disclosure",children:(0,fo.ZP)("review_display.4.0.disclosure."+e.disclosure_code,t)}),(0,_i.jsx)(zs,d()({},this.props))]})},r.renderInstagramContent=function(e,t){return(0,_i.jsxs)("div",{className:"pr-media-card-content-instagram",children:[(0,_i.jsxs)("div",{className:"pr-media-card-content-instagram-profile",children:[(0,_i.jsx)("div",{className:"pr-media-card-content-instagram-profile-info",children:(0,_i.jsx)("span",{className:"pr-media-card-content-instagram-profile-info-name",children:(0,_i.jsx)("a",{className:this.props.primarySlide?void 0:"pr-hide",href:e.profile_url,target:"_",children:e.username})})}),(0,_i.jsx)(Ls,{className:"pr-media-card-content-instagram-profile-icon"})]}),(0,_i.jsx)("div",{className:"pr-media-card-content-instagram-caption",children:(0,_i.jsx)("span",{children:e.caption})}),e.created_date&&(0,_i.jsx)("span",{className:"pr-media-card-content-instagram-date",children:(0,Nt.Jn)(e.created_date,{day_ago:(0,fo.ZP)("review_display.4.0.common.day_ago",t),days_ago:(0,fo.ZP)("review_display.4.0.common.days_ago",t),month_ago:(0,fo.ZP)("review_display.4.0.common.month_ago",t),months_ago:(0,fo.ZP)("review_display.4.0.common.months_ago",t),year_ago:(0,fo.ZP)("review_display.4.0.common.year_ago",t),years_ago:(0,fo.ZP)("review_display.4.0.common.years_ago",t)})}),(0,_i.jsx)(zs,d()({},this.props))]})},r.render=function(){var e=this.props,t=e.media,r=e.media,n=r.type,i=r.image,o=r.caption,a=r.youtubeID,s=e.localizations,l=e.className,c=e.primarySlide,u=e.forwardedRef,d="social_instagram"===t.source?this.renderInstagramContent(t,s):this.renderCardContent(t,s),p=o||(0,fo.ZP)("cd.common.media.media_caption",s);return(0,_i.jsxs)("section",{className:vo()("pr-media-card",l),role:"group","aria-roledescription":"slide","aria-label":this.props["aria-label"],ref:u,tabIndex:"-1",children:[(0,_i.jsxs)("div",{"aria-live":c?"polite":"off","aria-label":c?p:void 0,className:"pr-media-card-media",children:["image"===n?(0,_i.jsx)($s,{src:i,alt:p}):null,"yt"===n?(0,_i.jsx)("iframe",{height:"400",width:"100%",src:"https://youtube.com/embed/"+a,title:"YouTube video "+a}):null,"cvideo"===n?(0,_i.jsx)(Xs,{src:i,className:this.props.primarySlide?void 0:"pr-hide",height:"100%",width:"auto",controls:!0,preload:"metadata"}):null]}),(0,_i.jsxs)("div",{className:"pr-media-card-content",children:[d,this.renderFooter()]})]})},t}(xe.Component);po()(Js,"defaultProps",{className:"",allowReadReview:!0});var el=Js,tl=["isFlagging","media","readReviewID"],rl=xe.forwardRef((function(e,t){var r=e.isFlagging,n=e.media,i=e.readReviewID,o=s()(e,tl);return n?(0,_i.jsx)(el,d()(d()({},d()(d()({},o),{},{media:n,readReviewID:i})),{},{className:i||r?"pr-media-card-out":"pr-media-card-in",forwardedRef:t,"aria-label":e["aria-label"]})):null})),nl=xe.forwardRef((function(e,t){var r=e.media,n=e.localizations;if(!r)return null;var i,o=r.type,a=r.image,s=r.headline,l=r.disclosure_code,c=r.youtubeID;return"image"===o&&(i=(0,_i.jsx)("img",{className:"slide__img",src:a,alt:r.caption||(0,fo.ZP)("cd.common.media.media_caption",n),ref:t,tabIndex:"-1"})),"yt"===o&&(i=(0,_i.jsxs)("section",{className:"pr-rid-tile pr-video-tile",ref:t,tabIndex:"-1",children:[(0,_i.jsx)("iframe",{title:"YouTube video "+c,height:"100%",width:"100%",src:"//youtube.com/embed/"+c}),s]})),"cvideo"===o&&(i=(0,_i.jsxs)("section",{className:"pr-rid-tile pr-video-tile",ref:t,tabIndex:"-1",children:[(0,_i.jsx)("video",{height:"85%",width:"auto",controls:!0,preload:"metadata",children:(0,_i.jsx)("source",{src:a,type:"video/mp4"})}),s]})),(0,_i.jsxs)(xe.Fragment,{children:[i,l&&(0,_i.jsx)("p",{children:(0,fo.ZP)("review_display.4.0.disclosure."+l,n)})]})})),il=r(57448),ol=function(e){var t=e.ratingMaxValue,r=e.ratingValue,n=e.containerClassName,i=[],o=t-r;if(e.isAbbreviated)i.push((0,_i.jsx)(il.r,{filledPercent:100,size:24},"full-star"+r));else{for(var a=0,s=r;a-1,v=(0,Jo.x0)(),g=(0,Jo.x0)(),_=Bs(i,d,u,(function(e){return(0,Jo.WU)((0,fo.ZP)("review_display.4.0.helpful.helpful_vote_label",t),e)})),y=Bs(o,p,u,(function(e){return(0,Jo.WU)((0,fo.ZP)("review_display.4.0.helpful.unhelpful_vote_label",t),e)})),w=_.voted||y.voted;return(0,_i.jsxs)("footer",{className:"carousel__footer theme--dark",children:[(0,_i.jsx)("div",{className:"pr-rid-star-container",children:f&&(0,_i.jsx)(al,{containerClassName:"pr-white-stars",ratingValue:f,fullStarType:"starFillWhite",emptyStarType:"starStrokeWhite",localizations:t})}),(0,_i.jsx)("span",{id:v,children:h}),s&&"image"===c&&(0,_i.jsxs)("div",{className:"carousel__footer--flagging",children:[(0,_i.jsxs)("div",{className:"pr-rd-helpful-action",children:[(0,_i.jsx)("span",{className:"pr-rd-helpful-text pr-rd-bold",children:"Helpful?"}),(0,_i.jsx)("span",{className:"pr-accessible-text",id:g,children:(0,fo.ZP)("review_display.4.0.helpful.helpful_question",t)}),(0,_i.jsxs)(Hs,{voted:w,votedLabel:(0,fo.ZP)("review_display.4.0.helpful.already_voted",t),votedMessage:(0,fo.ZP)("review_display.4.0.helpful.thank_you",t),"aria-labelledby":g,"aria-describedby":v,children:[(0,_i.jsx)(Ks,{type:Ot,voted:_.voted,count:_.count,"aria-label":_.label,onClick:function(){return r(u,Ot)}}),(0,_i.jsx)(Ks,{type:Dt,voted:y.voted,count:y.count,"aria-label":y.label,onClick:function(){return r(u,Dt)}})]})]}),(0,_i.jsx)("aside",{className:"pr-rd-flag-image-container",children:m?(0,_i.jsxs)("div",{children:[(0,_i.jsx)(Ps,{}),(0,_i.jsx)("p",{className:"pr-flag-image-thankyou",children:"image flagged"})]}):(0,_i.jsx)("a",{href:"#","aria-label":"Flag",tabIndex:"0",role:"button",onClick:function(e){return l(e,u)},onKeyDown:function(){},children:"flag this image"})})]})]})},ll=function(e){return(0,_i.jsx)("span",{className:"pr-caret-icon",children:(0,_i.jsx)("svg",{viewBox:"-9 -10 52 52",focusable:"false",children:(0,_i.jsxs)("g",{children:[(0,_i.jsx)("polyline",{className:"pr-caret-icon__line",fill:"none",stroke:e.strokeColor,strokeWidth:e.lineStrokeSize,points:"23.7,31.5 8.3,16 23.7,0.5 "}),e.circleOutline&&(0,_i.jsx)("circle",{className:"pr-caret-icon__circle",cx:"17",cy:"16",r:"25",stroke:e.strokeColor,strokeWidth:e.circleStrokeSize,fill:e.fillColor})]})})})};ll.defaultProps={circleOutline:!0,fillColor:"none",strokeColor:"#333",lineStrokeSize:"2",circleStrokeSize:"2"};var cl=ll,ul=r(16679),dl=r(74834);var pl=function(e){var t=(0,bi.dZ)(e.config.page_id,e.type||ul.yW),r=(0,xe.useState)(e.startingIndex||0),n=r[0],i=r[1],o=(0,xe.useState)(null),a=o[0],s=o[1],l=xe.createRef();(0,xe.useEffect)((function(){var e;null===(e=l.current)||void 0===e||e.focus()}),[l]);var c=function(r){void 0===r&&(r="right");var o=e.handleCarouselChange;if(!a){t("right"===r?bi.GM.IMAGES_CLICK_NEXT:bi.GM.IMAGES_CLICK_PREV);var l="right"===r?1:-1;o&&o(n+l),s(r),setTimeout((function(){s(null),i((function(e){return e+l}))}),500)}},u=(0,dl.useSwipeable)({onSwipedLeft:function(){n+10&&c("left")},preventDefaultTouchmoveEvent:!0}),p=function(t){var r=e.localizations,n="prev"===t?(0,fo.ZP)("review_display.4.0.modal.button.previous",r):(0,fo.ZP)("review_display.4.0.modal.button.next",r),i="prev"===t?"left":"right";return(0,_i.jsx)("button",{type:"button","aria-label":n,className:"button button--dark button__"+t,onClick:function(){return c(i)},children:(0,_i.jsx)("span",{className:"icon icon--dark icon__"+t,children:(0,_i.jsx)(cl,{circleOutline:!0})})})},f=e.media,h=e.theme,m=e.merchantProperties,v=e.localizations,g=e.flaggedContent,_=e.helpfulContent,y=e.unhelpfulContent,w=e.isFlagging,b=e.openFlaggingForm,x=e.onHelpfulVoting,E=e.readReviewID;if(!f[n])return null;var S="Legacy"!==(0,Se.$)("PUFFERFISH_KILLER_STATUS",m),C=n>0&&!w&&!E,j=n+10?c("left"):39===t.keyCode&&n+11&&r<30)n+=1===r?" "+(0,fo.ZP)("review_display.4.0.common.day_ago",t).replace("{0}",r):" "+(0,fo.ZP)("review_display.4.0.common.days_ago",t).replace("{0}",r);else if(r>=30&&r<335){var i=Math.round(r/30);n+=1===i?" "+(0,fo.ZP)("review_display.4.0.common.month_ago",t).replace("{0}",i):" "+(0,fo.ZP)("review_display.4.0.common.months_ago",t).replace("{0}",i)}else if(r>=335){var o=Math.round(r/365);n+=1===o?" "+(0,fo.ZP)("review_display.4.0.common.year_ago",t).replace("{0}",o):" "+(0,fo.ZP)("review_display.4.0.common.years_ago",t).replace("{0}",o)}return n};function Cl(e,t){try{var r=new(Xt())(e);return r.searchParams.set("pr_rd_page",t),r.toString()}catch(t){return e}}var jl=function(e){var t,r,n=e.localizations,i=e.microdata,o=e.review,a=(0,fo.ZP)("review_display.4.0.common.date_format",n),s=""===a?Sl(o.details.created_date,n):xl()((t=o.details.created_date,r=new Date(t),new Date(r.getTime()-60*r.getTimezoneOffset()*1e3)),a.toLowerCase());return(0,_i.jsxs)("p",{className:"pr-rd-details pr-rd-author-submission-date",children:[(0,_i.jsx)("span",{className:"pr-rd-bold",children:(0,fo.ZP)("review_display.4.0.common.submitted",n)+" "}),(0,_i.jsx)("time",d()(d()({},i.datePublished),{},{dateTime:new Date(o.details.created_date).toISOString(),children:s}))]})},Il=function(e){var t=e.microdata,r=e.localizations,n=e.review.details.location,i=vo()("pr-rd-details pr-rd-author-location",{"pr-rd-author-location-undisclosed":n&&"undisclosed"===n.toLowerCase()});return(0,_i.jsx)("p",d()(d()({},t.locationRoot),{},{className:i,children:(0,_i.jsxs)("span",{children:[(0,_i.jsxs)("span",{className:"pr-rd-bold",children:[""+(0,fo.ZP)("review_display.4.0.common.from",r)," "]}),(0,_i.jsx)("span",d()(d()({},t.locationName),{},{children:n}))]})}))},kl=function(e){var t=e.review,r=e.localizations,n=e.merchantProperties,i=e.demographicProperties,o=e.microdata,a=e.className,s=void 0===a?"pr-rd-description pr-rd-content-block":a,l=e.children;return(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsxs)("div",{className:s,children:[(0,_i.jsxs)("div",{className:"pr-rd-reviewer-details pr-rd-inner-side-content-block",children:[(0,_i.jsx)(jl,{review:t,microdata:o,localizations:r}),(0,_i.jsx)(gl,{review:t,microdata:o,localizations:r}),(0,_i.jsx)(Il,{review:t,microdata:o,localizations:r}),y()(i).call(i,(function(e){return(0,_i.jsxs)("p",{className:"pr-rd-details pr-rd-demographic",children:[(0,_i.jsx)("span",{className:"pr-rd-bold",children:e.label+" "}),(0,_i.jsx)("span",{children:e.value.join(", ")})]},e.key)}))]}),(0,_i.jsx)(wl,{badges:t.badges,localizations:r}),t.details.disclosure_code&&(0,_i.jsx)("p",{className:"pr-rd-review-disclosure pr-rd-inner-side-content-block",children:(0,fo.ZP)("review_display.4.0.disclosure."+t.details.disclosure_code,r)}),(0,_i.jsx)(vl,{localizations:r,merchantProperties:n,review:t})]}),l]})},Nl=function(e){var t=e.localizations,r=e.review,n=e.productName,i=e.merchantProperties,o=r.details.product_name,a=o||n||"Product",s=i.PUBLISH_SERVICE_COMMENTS&&r.details.service_comments;if(o||s&&!o){var l=(0,fo.ZP)("review_display.4.0.description.comments_for",t);return(0,_i.jsx)("p",{className:"pr-rd-review-product pr-rd-bold",children:l+" "+a})}return null},Rl=function(e){function t(t){var r;return(r=e.call(this,t)||this).state={isExpanded:!1},r}vi()(t,e);var r=t.prototype;return r._toggleAccordion=function(e){e&&e.preventDefault(),this.props.toggleCallback&&this.props.toggleCallback(!this.state.isExpanded),this.state.isExpanded?this.setState({isExpanded:!1}):this.setState({isExpanded:!0})},r.render=function(){if(!this.props.children)return null;var e=this.state.isExpanded?"pr-accordion pr-accordion-exapanded":"pr-accordion pr-accordion-collapsed";this.props.className&&(e=this.state.isExpanded?this.props.className+" pr-accordion pr-accordion-exapanded":this.props.className+" pr-accordion pr-accordion-collapsed");var t=this.state.isExpanded?this.props.buttonLabelCollapsed:this.props.buttonLabelExpanded;return(0,_i.jsxs)("section",{className:e,children:[(0,_i.jsxs)("button",{type:"button",className:"pr-accordion-btn",onClick:this._toggleAccordion.bind(this),id:this.props.id+"-link","aria-expanded":this.state.isExpanded,"aria-controls":this.props.id+"-content",children:[(0,_i.jsx)("span",{children:t}),(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"4"})]}),(0,_i.jsx)("div",{"aria-hidden":!this.state.isExpanded,"aria-labelledby":this.props.id+"-link",className:"pr-accordion-content",id:this.props.id+"-content",role:"region",children:this.props.children})]})},t}(xe.Component);Rl.defaultProps={buttonLabelExpanded:"More Details",buttonLabelCollapsed:"Less Details",toggleCallback:function(){return!1}};var Pl=Rl,Tl=function(e){var t=e.review,r=e.localizations;return(0,_i.jsxs)("section",{className:"pr-rd-brand-response pr-rd-content-block",children:[t.details.brand_logo_uri&&(0,_i.jsx)("img",{className:"pr-rd-brand-response-logo",src:"//images.powerreviews.com"+t.details.brand_logo_uri,alt:t.details.brand_name,width:"25"}),(0,_i.jsxs)("div",{children:[(0,_i.jsx)("p",{className:"pr-rd-brand-response-headline",children:(0,_i.jsx)("strong",{children:(0,fo.ZP)("review_display.4.0.description.official_response_by_brand",r).replace("{0}",t.details.brand_name)})}),t.details.brand_response_datexxx&&(0,_i.jsxs)("p",{className:"pr-rd-brand-response-headline",children:[(0,fo.ZP)("review_display.4.0.description.responded",r),Sl(new Date(t.details.brand_response_datexxx),r)]}),(0,_i.jsx)("p",{className:"pr-rd-description-text pr-rd-left",children:"brand"===t.details.source?t.details.brand_response:t.details.merchant_response})]})]})},Al=/(?:(?:https?):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#/%=~_|$?!:,.]*\)|[A-Z0-9+&@#/%=~_|$])/gi,Ll=function(e,t){if(!t)return[e];for(var r=0,n=Al.exec(e),i=n?[Ni()(e).call(e,r,n.index)]:[e];n;){var o=n[0];0!==I()(o).call(o,"http")&&0!==I()(o).call(o,"//")&&(o="//"+o),r=n.index+n[0].length,i.push((0,_i.jsx)("a",{href:o,target:"_blank",rel:"noopener noreferrer",children:n[0]},r)),n=Al.exec(e),i.push(n?Ni()(e).call(e,r,n.index):Ni()(e).call(e,r))}return i},Ol=function(e){var t=e.review,r=e.localizations;return(0,_i.jsxs)("section",{className:"pr-rd-merchant-response pr-rd-content-block",children:[(0,_i.jsx)("p",{className:"pr-rd-merchant-response-headline",children:(0,_i.jsx)("strong",{children:(0,fo.ZP)("review_display.4.0.merchant_response.merchant_response",r)})}),(0,_i.jsx)("p",{className:"pr-rd-description-text pr-rd-left",children:Ll(t.details.merchant_response,!0)})]})},Dl=function(e){var t=e.localizations,r=e.review;return(0,_i.jsxs)("section",{className:"pr-rd-review-service pr-rd-content-block",children:[(0,_i.jsx)("p",{className:"pr-rd-bold",children:(0,fo.ZP)("review_display.4.0.description.service_comments",t)}),(0,_i.jsx)("p",{className:"pr-rd-description-text",children:r.details.service_comments})]})},Ml=function(e){var t=e.review,r=e.localizations,n=e.merchantProperties;return(0,_i.jsxs)(xe.Fragment,{children:[n.PUBLISH_SERVICE_COMMENTS&&t.details.service_comments&&(0,_i.jsx)(Dl,{review:t,localizations:r}),"syndicated"===t.details.source&&t.details.merchant_response&&(0,_i.jsx)(Tl,{review:t,localizations:r}),"syndicated"!==t.details.source&&t.details.merchant_response&&(0,_i.jsx)(Ol,{review:t,localizations:r}),t.details.brand_response&&(0,_i.jsx)(Tl,{review:t,localizations:r})]})},Fl=function(e){var t,r=e.tag,n=e.localization,i=y()(t=r.value).call(t,(function(e,t){return(0,_i.jsx)("dd",{children:""+e},"tag-"+r.key+"-"+t)}));return(0,_i.jsxs)("dl",{className:"pr-rd-review-tag",children:[(0,_i.jsx)("dt",{children:n||r.label}),i]},"tag-"+r.key)},zl=r(49274),Vl=function(e){var t,r=e.tag,n=e.localizations,i=e.merchantProperties;if(!r.value||r.value.length<=0)return(0,_i.jsx)("div",{});switch(r.type){case"subrating":var o=(0,zl.W)((0,fo.ZP)("review_display.4.0.common.rated_x_out_of_y",n),r.value[0]);return(0,_i.jsxs)("dl",{className:"pr-rd-def-list",children:[(0,_i.jsx)("dt",{children:r.label}),(0,_i.jsx)("dd",{children:(0,_i.jsx)("div",{children:(0,_i.jsx)("div",{children:(0,_i.jsx)(xo,{isInteractive:!1,preset:Number(r.value[0]),ratingValue:Number(r.value[0]),starStyles:(0,Se.$)("pr_star_styles")||i.STAR_STYLES,ratingLabel:o})})})})]},"subrating-"+r.key);case"tag":return(0,_i.jsxs)("dl",{className:"pr-rd-def-list",children:[(0,_i.jsx)("dt",{children:r.label}),(0,_i.jsx)("dd",{children:b()(t=r.value).call(t,(function(e,t){return e+", "+t}))})]},"tag-"+r.key);case"textbox":return(0,_i.jsxs)("dl",{className:"pr-rd-def-list",children:[(0,_i.jsx)("dt",{children:r.label}),(0,_i.jsx)("dd",{children:r.value})]},"textbox-"+r.key);default:console.error("Unhandled MSQ type!!")}},ql=function(e){var t,r,n,i=e.size,o=e.msqData,a=y()(t=o.display_values).call(t,(function(e,t){var r,n=m()(r=gn()(o)).call(r,(function(t){return t.label===e}))[0];return n?d()(d()({},n),{},{position:t}):{label:e,count:0,position:t}})),s=y()(r=Ni()(n=[0,0,0,0,0]).call(n,0,i)).call(r,(function(e,t){var r=vo()("pr-size-fit_slider_node",{"pr-size-fit_slider_node--active":Math.round((0,Bt.iv)(a))===t});return(0,_i.jsx)("div",{className:r},t)}));return(0,_i.jsxs)("div",{className:"pr-size-fit_slider",role:"img","aria-label":(0,Bt.g_)(a),children:[(0,_i.jsx)("div",{className:"pr-size-fit_slider_node-group",children:s}),(0,_i.jsx)("div",{className:"pr-size-fit_slider_line"})]})};function Wl(e){var t,r=e.labelPosition,n=e.msqData,i=e.msqData.display_values;return t="sides"===r?Bl:"top"===r?Ul:Zl,(0,_i.jsx)(t,{labels:[i[0],i[i.length-1]],children:(0,_i.jsx)(ql,{msqData:n})})}function Ul(e){var t=e.labels,r=e.children;return(0,_i.jsxs)("div",{className:"pr-size-fit pr-size-fit--labels-top",children:[(0,_i.jsxs)("div",{className:"pr-size-fit_labels","aria-hidden":"true",children:[(0,_i.jsx)("div",{className:"pr-size-fit_label",children:t[0]}),(0,_i.jsx)("div",{className:"pr-size-fit_label",children:t[1]})]}),r]})}function Zl(e){var t=e.labels,r=e.children;return(0,_i.jsxs)("div",{className:"pr-size-fit pr-size-fit--labels-bottom",children:[r,(0,_i.jsxs)("div",{className:"pr-size-fit_labels","aria-hidden":"true",children:[(0,_i.jsx)("div",{className:"pr-size-fit_label",children:t[0]}),(0,_i.jsx)("div",{className:"pr-size-fit_label",children:t[1]})]})]})}function Bl(e){var t=e.labels,r=e.children;return(0,_i.jsxs)("div",{className:"pr-size-fit pr-size-fit--labels-sides",children:[(0,_i.jsx)("div",{className:"pr-size-fit_label","aria-hidden":"true",children:t[0]}),(0,_i.jsx)("div",{className:"pr-size-fit_slider-container",children:r}),(0,_i.jsx)("div",{className:"pr-size-fit_label","aria-hidden":"true",children:t[1]})]})}function Hl(e,t){var r;return{display_values:e.display_values,values:y()(r=gn()(e)).call(r,(function(e){return{label:e.label,count:e.label===t?1:0}}))}}var Kl=r(72994),Gl={pros:-4,cons:-3,bestuses:-2};var Ql=function(e){for(var t,r=e.localizations,n=e.config,i=e.merchantProperties,o=e.properties,a=e.propertiesByKey,s=(0,Se.v)(i,n).CD4_ENABLED_HISTOGRAM_SLIDER_KEYS,l=void 0===s?"":s,u=(0,Yi.I)((0,Kl.i)(l)),d=[],p=[],f=[],h=function(e){return Yt()(e).call(e,(function(e,t){return(Gl[e.key]||0)-(Gl[t.key]||0)}))}(o),m=c()(h);!(t=m()).done;){var v=t.value;if(a.hasOwnProperty(v.key)&&"histogram"===a[v.key].display_type&&u.has(v.key)){var g=Hl(a[v.key],v.value[0]);f.push((0,_i.jsxs)("div",{className:"pr-rd-sliders_slider",children:[(0,_i.jsx)("span",{className:"pr-rd-sliders_title",children:v.label}),(0,_i.jsx)(Wl,{msqData:g})]},v.key))}else if("pros"===v.key||"cons"===v.key||"bestuses"===v.key){var _=void 0;_="bestuses"===v.key?r["review_display.4.0.review_tag_groups.best_uses"]:r["review_display.4.0.review_tag_groups."+v.key],d.push((0,_i.jsx)(Fl,{tag:v,localization:_},"tag-groups-"+v.key))}else p.push((0,_i.jsx)(Vl,{tag:v,localizations:r,merchantProperties:i},"msq-"+v.key))}return(0,_i.jsxs)(xe.Fragment,{children:[f.length>0?(0,_i.jsx)("div",{className:"pr-rd-sliders",children:f}):null,!!d.length&&(0,_i.jsx)("section",{className:"pr-rd-tags pr-rd-content-block",children:d}),!!p.length&&(0,_i.jsx)("section",{className:"pr-rd-subratings pr-rd-content-block",children:p})]})},Yl=function(e){var t=e.isCondensed,r=e.localizations,n=e.merchantProperties,i=e.msqProperties,o=e.propertiesByKey,a=e.review,s=e.sendBeacon,l=e.children;return t?(0,_i.jsxs)(Pl,{id:a.review_id,className:"pr-rd-content-block",buttonLabelExpanded:(0,fo.ZP)("review_display.4.0.common.more_details",r),buttonLabelCollapsed:(0,fo.ZP)("review_display.4.0.common.less_details",r),toggleCallback:function(e){return e&&s(bi.GM.REVIEW_DISPLAY_MORE_DETAILS(a.ugc_id))},children:[(0,_i.jsx)(Ml,{localizations:r,review:a,merchantProperties:n}),!!i.length&&(0,_i.jsx)(Ql,{properties:i,propertiesByKey:o,localizations:r,review:a,merchantProperties:n}),l]}):(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)(Ml,{localizations:r,review:a,merchantProperties:n}),(0,_i.jsx)(Pl,{id:a.review_id,className:"pr-rd-content-block",buttonLabelExpanded:(0,fo.ZP)("review_display.4.0.common.more_details",r),buttonLabelCollapsed:(0,fo.ZP)("review_display.4.0.common.less_details",r),toggleCallback:function(e){return e&&s(bi.GM.REVIEW_DISPLAY_MORE_DETAILS(a.ugc_id))},children:!!i.length&&(0,_i.jsx)(Ql,{properties:i,propertiesByKey:o,localizations:r,review:a,merchantProperties:n})}),l]})},$l="data:image/svg+xml,%3c%3fxml version='1.0' %3f%3e%3csvg height='22px' version='1.1' viewBox='0 0 20 20' width='20px' focusable='false' xmlns='http://www.w3.org/2000/svg' xmlns:sketch='http://www.bohemiancoding.com/sketch/ns' xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle/%3e%3cdesc/%3e%3cdefs/%3e%3cg fill='none' stroke='%23999' stroke-width='0.35'%3e%3cg fill='white' transform='translate(-168.000000%2c -85.000000)'%3e%3cg transform='translate(168.000000%2c 85.000000)'%3e%3cpath d='M8%2c14.5 L14%2c10 L8%2c5.5 L8%2c14.5 L8%2c14.5 Z M10%2c0 C4.5%2c0 0%2c4.5 0%2c10 C0%2c15.5 4.5%2c20 10%2c20 C15.5%2c20 20%2c15.5 20%2c10 C20%2c4.5 15.5%2c0 10%2c0 L10%2c0 Z M10%2c18 C5.6%2c18 2%2c14.4 2%2c10 C2%2c5.6 5.6%2c2 10%2c2 C14.4%2c2 18%2c5.6 18%2c10 C18%2c14.4 14.4%2c18 10%2c18 L10%2c18 Z' /%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Xl=r(79131),Jl=r.n(Xl),ec=r(25029),tc=[Mt,Ft,zt,Vt,qt,Wt,Ut,Zt],rc=function(e){var t=e.localizations,r=e.isImageForm,n=e.onClose,i=e.onSubmit,o=(0,xe.useState)(""),a=o[0],s=o[1],l=(0,xe.useState)(""),c=l[0],u=l[1],d=(0,xe.useState)(""),p=d[0],f=d[1],h=(0,xe.useState)("profane"),m=h[0],v=h[1],g=(0,xe.useState)(!0),_=g[0],w=g[1],b=(0,xe.useRef)(null),x=(0,xe.useRef)(),E=(0,xe.useRef)((0,Jo.x0)());(0,xe.useEffect)((function(){b.current&&b.current.focus()}),[]),(0,xe.useEffect)((function(){_||x.current.focus()}),[_]);var S=(0,fo.ZP)("review_display.4.0.flagging_form.whats_the_issue_label",t),C=(0,fo.ZP)("review_display.4.0.flagging_form.email_address_label",t),j=(0,fo.ZP)("review_display.4.0.flagging_form.comments_label",t),I=(0,fo.ZP)("review_display.4.0.flagging_form.button_label.flag",t),k=(0,fo.ZP)("review_display.4.0.flagging_form.button_label.cancel",t),N=function(e,t){return[(0,fo.ZP)("review_display.4.0.flagging_form.profanity_label",e),(0,fo.ZP)("review_display.4.0.flagging_form.wrong_product_label",e),(0,fo.ZP)("review_display.4.0.flagging_form.spam_label",e),(0,fo.ZP)("review_display.4.0.flagging_form.duplicate_label",e),(0,fo.ZP)("review_display.4.0.flagging_form.copyright_label",e),(0,fo.ZP)("review_display.4.0.flagging_form.not_product_review_label",e),t?(0,fo.ZP)("review_display.4.0.flagging_form.inappropriate_image_label",e):(0,fo.ZP)("review_display.4.0.flagging_form.customer_image_label",e),(0,fo.ZP)("review_display.4.0.flagging_form.other_label",e)]}(t,r),R=y()(N).call(N,(function(e,t){return(0,_i.jsx)("div",{className:"pr-flagging-radio",children:(0,_i.jsxs)("label",{htmlFor:"flagOptions"+t,children:[(0,_i.jsx)("input",{className:"pr-flag-review-input pr-form-control pr-radio pr-form-radio",type:"radio",onChange:function(e){return v(e.target.value)},name:"flagOptions",id:"flagOptions"+t,value:tc[t].toLowerCase(),defaultChecked:0===t,required:!0,ref:0===t?b:null}),(0,_i.jsx)("span",{children:" "+e})]})},e)}));return(0,_i.jsxs)("form",{id:"pr-flag-reviews",className:"pr-flag-review",noValidate:!0,onSubmit:function(e){e&&e.preventDefault();var r=(0,fo.ZP)("review_display.4.0.flagging_form.required_error",t),o=(0,fo.ZP)("review_display.4.0.flagging_form.email_error",t),s=Nt.K0(a,!0,"EMAIL");if(!s){var l=Jl()(a).call(a).length?o:r;return w(s),void f(s?null:l)}w(!0),f(null),i({contact_email:a,flag_comment:c,flag_type:m}).then((function(){n()})).catch((function(e){return null==e?void 0:e.detail.forEach((function(e){e.fields.forEach((function(e){"contact_email"===e&&(w(!1),f(r))}))}))}))},children:[(0,_i.jsxs)("fieldset",{className:"pr-flag-review-fieldset",children:[(0,_i.jsxs)("legend",{className:"pr-flag-review-label pr-control-label","aria-required":"true",children:[(0,_i.jsx)("b",{children:S+" "}),(0,_i.jsx)("abbr",{"aria-hidden":"true",children:"*"})]}),(0,_i.jsxs)("div",{className:"pr-flagging-radiogroup",children:[(0,_i.jsx)("div",{className:"pr-form-group pr-flagging-form-group",children:Ni()(R).call(R,0,Math.ceil(R.length/2))}),(0,_i.jsx)("div",{className:"pr-form-group pr-flagging-form-group",children:Ni()(R).call(R,Math.ceil(R.length/2),R.length)})]})]}),(0,_i.jsxs)("div",{className:vo()("pr-flag-review-fieldset",{"pr-has-error":!_}),children:[(0,_i.jsxs)("label",{className:"pr-control-label pr-flag-review-label",htmlFor:"pr-email-field",children:[(0,_i.jsx)("b",{children:C+" "}),(0,_i.jsx)("abbr",{"aria-hidden":"true",children:"*"})]}),(0,_i.jsxs)(ec.X,{children:[(0,_i.jsx)("input",{id:"pr-email-field",type:"email",ref:x,className:"pr-form-control form-control pr-textinput pr-flag-review-input",value:a,onChange:function(e){return s(e.target.value)},"aria-required":!0,"aria-invalid":!_||void 0,"aria-describedby":_?void 0:E.current,autoComplete:"on"}),_?null:(0,_i.jsx)(ec.N,{})]}),!_&&(0,_i.jsx)("span",{className:"pr-field-alert pr-text-danger pr-flag-error",id:E.current,children:p})]}),(0,_i.jsxs)("div",{className:"pr-flag-review-fieldset",children:[(0,_i.jsx)("label",{className:"pr-control-label pr-flag-review-label",htmlFor:"pr-flag-comments",children:j}),(0,_i.jsx)("textarea",{value:c,onChange:function(e){return u(e.target.value)},"aria-multiline":"true",id:"pr-flag-comments",type:"textarea",rows:"5",className:"pr-form-control pr-textarea pr-flag-review-input"})]}),(0,_i.jsx)("button",{className:"pr-btn pr-btn-default pr-flag-review-btn pr-flag-review-btn-submit",type:"submit",children:I}),(0,_i.jsx)("button",{type:"button",className:"pr-btn pr-btn-default pr-flag-review-btn pr-flag-review-btn-cancel",onClick:n,children:k})]})},nc=function(e){return{carouselLabel:(0,fo.ZP)("review_display.4.0.image_display.consumer_photos",e),prevBtn:(0,fo.ZP)("review_display.4.0.modal.button.previous",e),slideLabel:(0,fo.ZP)("review_display.4.0.modal.media_carousel.slide_label",e),nextBtn:(0,fo.ZP)("review_display.4.0.modal.button.next",e),viewMore:(0,fo.ZP)("review_display.4.0.modal.media_carousel.button.expand_review",e),viewLess:(0,fo.ZP)("review_display.4.0.modal.media_carousel.button.condense_review",e),flagged:(0,fo.ZP)("review_display.4.0.modal.is_flagged",e),flagImage:(0,fo.ZP)("review_display.4.0.modal.flag_image",e),poweredBy:(0,fo.ZP)("review_display.4.0.modal.media_carousel.powered_by",e),shopProducts:(0,fo.ZP)("review_display.4.0.modal.shop_all",e)}},ic=r(50418),oc=r.n(ic),ac=["className"],sc=function(e){var t=e.className,r=s()(e,ac);return(0,_i.jsx)("svg",d()(d()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24","aria-hidden":"true",focusable:"false",className:vo()("pr-icon pr-icon-chevron",t)},r),{},{children:(0,_i.jsx)("path",{fill:"none",strokeLinecap:"square",strokeLinejoin:"round",strokeWidth:"2",d:"M15 19l-7-7 7-7"})}))},lc=["className"],cc=function(e){var t=e.className,r=s()(e,lc);return(0,_i.jsx)("svg",d()(d()({version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",viewBox:"0 0 216 146",enableBackground:"new 0 0 216 146","aria-hidden":"true",focusable:"false",className:vo()("pr-icon pr-icon-flag",t)},r),{},{children:(0,_i.jsxs)("g",{children:[(0,_i.jsx)("path",{d:"M55.4,13.5c-2-2-4.5-3.1-7.4-3.1c-2.9,0-5.3,1-7.4,3.1c-2,2-3.1,4.5-3.1,7.4c0,3.9,1.7,6.9,5.2,9V133c0,0.7,0.3,1.3,0.8,1.8c0.5,0.5,1.1,0.8,1.8,0.8h5.2c0.7,0,1.3-0.3,1.8-0.8c0.5-0.5,0.8-1.1,0.8-1.8V29.8c3.5-2.1,5.2-5.1,5.2-9C58.5,18,57.4,15.5,55.4,13.5z"}),(0,_i.jsx)("path",{d:"M176.8,22.4c-1-1-2.3-1.5-3.7-1.5c-0.7,0-2.2,0.6-4.4,1.7s-4.6,2.4-7.2,3.8c-2.5,1.4-5.5,2.7-9,3.8c-3.4,1.1-6.6,1.7-9.6,1.7c-2.7,0-5.1-0.5-7.2-1.5c-6.8-3.2-12.8-5.6-17.8-7.2c-5.1-1.6-10.5-2.4-16.3-2.4c-10,0-21.5,3.3-34.3,9.8c-3.2,1.6-5.3,2.7-6.4,3.5c-1.7,1.2-2.5,2.7-2.5,4.5v60.5c0,1.4,0.5,2.6,1.5,3.7c1,1,2.3,1.5,3.7,1.5c0.9,0,1.8-0.2,2.7-0.7c14.8-7.9,27.4-11.9,37.8-11.9c4,0,7.8,0.6,11.6,1.8c3.8,1.2,6.9,2.5,9.4,3.9c2.5,1.4,5.4,2.7,8.8,3.9c3.4,1.2,6.8,1.8,10.1,1.8c8.4,0,18.4-3.1,30.1-9.4c1.5-0.8,2.5-1.5,3.2-2.2s1-1.8,1-3.1V26.1C178.4,24.7,177.9,23.4,176.8,22.4z"})]})}))},uc=["className"],dc=function(e){var t=e.className,r=s()(e,uc);return(0,_i.jsx)("svg",d()(d()({viewBox:"0 0 84 85","aria-hidden":"true",focusable:"false",className:vo()("pr-icon pr-icon-logo",t)},r),{},{children:(0,_i.jsxs)("g",{fill:"none",stroke:"none",children:[(0,_i.jsx)("path",{d:"M44.378 25.846h-9.384v14.256h9.384c4.51 0 7.577-2.587 7.577-7.098 0-4.51-3.066-7.158-7.577-7.158zm.36 20.15h-9.744v16.839H28.5V23.25c0-1.677 1.59-3.237 3.332-3.237h12.906c8.362 0 13.715 5.534 13.715 12.991 0 7.459-5.353 12.993-13.715 12.993z",fill:"#888787"}),(0,_i.jsx)("path",{d:"M59.328 62.839l-9.852-14.175s-1.098.529-4.42.529h-3.201l9.39 13.655 8.083-.01",fill:"#888787"}),(0,_i.jsx)("path",{d:"M6.263 42.286c-.023-8.942 2.839-16.655 8.688-23.419l-4.737-4.097C3.338 22.72-.026 31.79 0 42.3c.06 23.154 18.878 41.877 42.03 41.818l-.015-6.255c-19.695.046-35.702-15.88-35.752-35.577",fill:"#75C6B8"}),(0,_i.jsx)("path",{d:"M77.261 47.07C74.814 64.809 59.924 77.818 42.02 77.864h-.005l.015 6.255c21.047-.054 38.549-15.346 41.425-36.194l-6.194-.855",fill:"#FBB817"}),(0,_i.jsx)("path",{d:"M64.05 6.584L60.748 11.9l.005.002C72.916 19.46 79.217 32.883 77.26 47.07l6.194.855c2.3-16.675-5.107-32.456-19.405-41.34",fill:"#53C7E6"}),(0,_i.jsx)("path",{d:"M60.748 11.899l3.302-5.315c-10.719-6.66-22.427-8.17-34.485-4.452l1.846 5.984.004-.001C41.67 4.95 51.63 6.235 60.748 11.899",fill:"#8AC734"}),(0,_i.jsx)("path",{d:"M31.411 8.116l-1.846-5.984c-8.03 2.479-13.853 6.28-19.35 12.638l4.736 4.097.002-.001c4.676-5.409 9.628-8.642 16.458-10.75",fill:"#F05E24"})]})}))},pc=["className"],fc=function(e){var t=e.className,r=s()(e,pc);return(0,_i.jsx)("svg",d()(d()({version:"1.1",x:"0px",y:"0px",viewBox:"0 0 216 146",xmlSpace:"preserve",focusable:"false","aria-hidden":"true",className:vo()("pr-icon pr-icon-thumb",t)},r),{},{children:(0,_i.jsxs)("g",{children:[(0,_i.jsx)("path",{d:"M168.7,79.9c3-3.4,4.5-7.5,4.5-12.1c0-4.2-1.6-7.9-4.6-11c-3.1-3.1-6.8-4.6-11-4.6H135 c0.2-0.8,0.4-1.4,0.7-2s0.5-1.1,0.9-1.8s0.7-1.1,0.8-1.5c1-1.8,1.7-3.4,2.2-4.6c0.5-1.2,1-2.8,1.5-4.9c0.5-2.1,0.8-4.1,0.8-6.2 c0-1.3,0-2.4,0-3.2c0-0.8-0.2-2-0.4-3.7c-0.2-1.6-0.6-3-1-4.1c-0.4-1.1-1.1-2.3-2-3.7c-0.9-1.4-2-2.5-3.3-3.3s-2.9-1.5-4.9-2.1 c-2-0.6-4.2-0.9-6.7-0.9c-1.4,0-2.6,0.5-3.7,1.5c-1.1,1.1-2,2.4-2.8,4.1c-0.8,1.6-1.3,3-1.6,4.2c-0.3,1.2-0.6,2.9-1,5 c-0.5,2.3-0.9,3.9-1.1,4.9c-0.2,1-0.7,2.3-1.4,4c-0.7,1.6-1.5,2.9-2.5,3.9c-1.8,1.8-4.5,5.1-8.2,9.8c-2.7,3.5-5.4,6.8-8.2,9.9 c-2.8,3.1-4.9,4.7-6.2,4.8c-1.4,0.1-2.5,0.7-3.5,1.7s-1.5,2.2-1.5,3.5v52.2c0,1.4,0.5,2.6,1.5,3.6s2.3,1.5,3.7,1.6 c1.9,0.1,6.2,1.2,12.9,3.6c4.2,1.4,7.5,2.5,9.8,3.2c2.4,0.7,5.7,1.5,9.9,2.4c4.2,0.8,8.1,1.3,11.7,1.3h1.4h6.2h2.9 c7.2-0.1,12.6-2.2,16.1-6.4c3.1-3.7,4.5-8.7,4-14.7c2.1-2,3.6-4.6,4.4-7.7c0.9-3.3,0.9-6.5,0-9.5c2.5-3.3,3.7-7,3.5-11.2 C169.9,84.4,169.5,82.3,168.7,79.9z"}),(0,_i.jsx)("path",{d:"M71.5,62.6H48c-1.4,0-2.6,0.5-3.7,1.5s-1.5,2.3-1.5,3.7v52.1c0,1.4,0.5,2.6,1.5,3.7c1,1,2.3,1.5,3.7,1.5 h23.5c1.4,0,2.6-0.5,3.7-1.5c1-1,1.5-2.3,1.5-3.7V67.8c0-1.4-0.5-2.6-1.5-3.7C74.1,63.1,72.9,62.6,71.5,62.6z M62.1,113.2 c-1,1-2.3,1.5-3.7,1.5c-1.5,0-2.7-0.5-3.7-1.5c-1-1-1.5-2.2-1.5-3.7c0-1.4,0.5-2.6,1.5-3.7c1-1,2.2-1.5,3.7-1.5 c1.4,0,2.6,0.5,3.7,1.5c1,1,1.5,2.3,1.5,3.7C63.7,111,63.2,112.2,62.1,113.2z"})]})}))},hc=["className"],mc=function(e){var t=e.className,r=s()(e,hc);return(0,_i.jsx)("svg",d()(d()({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:vo()("pr-icon pr-icon-x",t)},r),{},{children:(0,_i.jsx)("path",{stroke:"none",fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})}))},vc=["children","closeBtnText","handleClose","isFlagMediaOpen"];function gc(e){var t=e.children,r=e.closeBtnText,n=e.handleClose,i=e.isFlagMediaOpen,o=s()(e,vc),a=(0,xe.useRef)(document.createElement("div"));return(0,xe.useEffect)((function(){if(null!=a.current){var e=a.current;return e.className="p-w-r",document.body&&document.body.appendChild(e),function(){return e.remove()}}}),[]),(0,xe.useEffect)((function(){var e=document.querySelector("html").style.height,t=document.querySelector("html").style.overflow,r=document.body.style.height,n=document.body.style.overflow,i=window.scrollY;return oc()(document.querySelector("html").style,{height:"100vh",overflow:"hidden"}),oc()(document.body.style,{height:"100vh",overflow:"hidden"}),function(){oc()(document.querySelector("html").style,{overflow:t,height:e}),oc()(document.body.style,{overflow:n,height:r}),window.scrollTo(0,i)}}),[]),(0,Ee.createPortal)((0,_i.jsx)(Cs,{children:(0,_i.jsx)("div",{className:"p-w-r_future",children:(0,_i.jsxs)("div",{className:"pr-fixed pr-h-full pr-w-full pr-top-0 pr-left-0 pr-bg-black pr-bg-opacity-90 pr-flex pr-justify-center pr-items-center pr-z-max",onKeyDown:function(e){"Escape"===e.key&&n()},children:[(0,_i.jsx)("div",{"aria-hidden":"true",className:"pr-modal__backdrop pr-left-0 pr-right-0 pr-bottom-0 pr-top-0 pr-absolute pr-overflow-hidden pr-z-10",onClick:n}),(0,_i.jsx)("button",{type:"button","aria-label":r,className:"pr-modal__close-button pr-absolute pr-top-3 pr-right-3 pr-w-8 pr-h-8 pr-z-30",onClick:n,children:(0,_i.jsx)(mc,{className:vo()("pr-modal__close-button__icon",{"pr-text-white":!0===i,"pr-text-gray-400 md-modal:pr-text-white":!1===i})})}),(0,_i.jsx)("div",d()(d()({"aria-modal":"true",className:"pr-z-20"},o),{},{children:t}))]})})}),a.current)}var _c=xe.forwardRef((function(e,t){var r=e.arrowDirection,n=e.labelText,i=e.handleCarouselChange;return(0,_i.jsx)("button",{type:"button",className:vo()("pr-media-carousel__nav-button","sm:pr-h-16 sm:pr-w-16 pr-h-10 pr-w-10 pr-absolute pr-top-1/4 pr-z-10 pr-p-2 sm:pr-p-4 pr-bg-white pr-rounded-full md-modal:pr-bg-transparent md-modal:pr-rounded-none md-modal:pr-top-auto",{"pr-media-carousel__nav-button--left sm:pr-left-7 md-modal:pr-left-3 lg:pr-left-10 xl:pr-left-32 pr-left-3 pr-shadow-md md-modal:pr-shadow-none":"left"===r,"pr-media-carousel__nav-button--right sm:pr-right-7 md-modal:pr-right-3 lg:pr-right-10 xl:pr-right-32 pr-right-3 pr-transform pr-rotate-180 pr-shadow-md-rotate md-modal:pr-shadow-none":"right"===r}),ref:t,"aria-label":n,onClick:i,children:(0,_i.jsx)(sc,{className:"pr-text-gray-400 md-modal:pr-text-white"})})}));function yc(e){var t=e.caption,r=e.author,n=e.expandReviewText,i=e.condenseReviewText,o=(0,xe.useState)(),a=o[0],s=o[1],l=(0,xe.useState)(),c=l[0],u=l[1];return(0,xe.useEffect)((function(){null==r&&null==t||(u((null==r?void 0:r.length)+(null==t?void 0:t.length)>115?t.substring(0,115-(null==r?void 0:r.length))+"...":null),s(null!=c))}),[r,t,c]),(0,_i.jsxs)("div",{className:"pr-media-carousel__caption pr-text-base pr-mt-4 pr-mb-8 pr-break-all",children:[(0,_i.jsx)("span",{className:"pr-media-carousel__caption__author pr-font-bold pr-text-black pr-pr-2",children:r}),(0,_i.jsx)("span",{className:"pr-media-carousel__caption__text pr-text-gray-400",children:a?c:t}),c&&(0,_i.jsx)("button",{className:vo()("pr-media-carousel__caption__toggle","pr-underline pr-text-gray-600",{"pr-ml-2 ":!1===a}),onClick:function(){return s(!a)},children:a?n:i})]})}function wc(e){var t=e.isFlagged,r=e.flagMediaText,n=e.handleFlagMedia;return t?(0,_i.jsxs)("div",{className:"pr-flag-content--flagged pr-flex pr-items-center pr-pr-1 pr-text-red-600",children:[(0,_i.jsx)(cc,{className:"pr-w-6 pr-pr-0.5"}),(0,_i.jsx)("div",{className:"pr-flag-content__label pr-font-medium pr-text-xs",children:r})]}):(0,_i.jsx)("div",{className:"pr-flag-content pr-flex pr-items-center pr-pr-1",children:(0,_i.jsxs)("button",{className:"pr-flag-content__button pr-flex pr-pr-1 pr-text-blue-600",onClick:n,children:[(0,_i.jsx)(cc,{className:"pr-w-6 pr-pr-0.5"}),(0,_i.jsx)("div",{className:"pr-flag-content__label pr-font-medium pr-text-xs pr-underline pr-text-blue-600 hover:pr-no-underline",children:r})]})})}var bc=function(e){var t=e.viewport,r=e.isHelpful,n=e.isUnhelpful,i=e.handleHelpfulVoting,o=e.helpfulVotes,a=e.notHelpfulVotes,s=e.mediaId;return(0,_i.jsxs)("div",{className:vo()("pr-vote-content","pr-flex pr-border pr-rounded-sm pr-border-gray-300 pr-border-b-2",{"pr-mr-6":"desktop"===t}),children:[(0,_i.jsxs)("button",{type:"button",className:vo()("pr-vote-content__button pr-vote-content__button--helpful","pr-flex pr-py-1.5 pr-px-2 pr-items-center",{"hover:pr-bg-gray-200 pr-bg-white pr-text-gray-400":!r&&!n,"pr-cursor-default pr-bg-opacity-50":r||n,"pr-text-gray-400":n,"pr-bg-blue-600 pr-text-white":r}),disabled:r||n,onClick:function(){return i(s,"helpful")},children:[(0,_i.jsx)(fc,{className:vo()("pr-w-8 pr-h-5 pr-pr-1",{"pr-text-white":r,"pr-text-gray-400":!r})}),r?o+1:o||0]}),(0,_i.jsxs)("button",{type:"button",className:vo()("pr-vote-content__button pr-vote-content__button--unhelpful","pr-flex pr-border-l pr-border-gray-300 pr-py-1 pr-px-2 pr-items-center",{"hover:pr-bg-gray-200 pr-bg-white pr-text-gray-400":!r&&!n,"pr-cursor-default pr-bg-opacity-50":r||n,"pr-text-gray-400":r,"pr-bg-blue-600 pr-text-white":n}),disabled:r||n,onClick:function(){return i(s,"unhelpful")},children:[(0,_i.jsx)(fc,{className:vo()("pr-w-8 pr-h-5 pr-pl-1","pr-transform pr-rotate-180 pr-translate-y-0.5",{"pr-text-white":n,"pr-text-gray-400":!n})}),n?a+1:a||0]})]})},xc=function(e){var t=e.heading,r=e.isLarge,n=e.shopProductsArray;return!1===Array.isArray(n)?null:(0,_i.jsxs)("div",{className:vo()("pr-shop-products","pr-flex pr-flex-col pr-items-center pr-mt-12 pr-mb-6 sm:pr-mt-0 sm:pr-mb-0 sm:pr-bg-white md-modal:pr-w-44 sm:pr-overflow-auto",{"pr-shop-products--lg sm:pr-w-40":r}),children:[(0,_i.jsx)("h2",{className:"pr-shop-products__heading pr-font-bold pr-text-base sm:pr-text-lg sm:pr-mb-6",children:t}),(0,_i.jsx)("ul",{className:vo()("pr-shop-products__list",{"pr-h-shopProductsLg pr-overflow-auto":r}),children:y()(n).call(n,(function(e,t){return(0,_i.jsx)("li",{className:"pr-shop-products__list__item",children:(0,_i.jsxs)("a",{href:e.product_url,className:"pr-shop-products__list__item__link hover:pr-underline pr-mb-6",children:[(0,_i.jsx)("div",{className:"pr-h-40 pr-w-40 pr-my-2",children:(0,_i.jsx)("img",{src:e.product_image_url,alt:e.product_name,className:"pr-shop-products__list__item__link__image pr-w-full pr-h-full pr-object-contain",width:160,height:160})}),(0,_i.jsx)("div",{className:"pr-shop-products__list__item__link__name pr-text-sm pr-w-40",children:e.product_name})]})},e.product_url+"-"+t)}))})]})},Ec=xe.forwardRef((function(e,t){var r,n=e.allowHelpfulVoting,i=e.handleFlagMedia,a=e.handleHelpfulVoting,s=e.index,l=e.isFlagged,c=e.isHelpful,u=e.isUnhelpful,d=e.showShoppableLink,p=e.localizations,f=e.media,h=f.caption,m=f.id,v=f.image,g=f.username,_=f.nickname,y=f.headline,w=f.type,b=f.helpful_votes,x=f.not_helpful_votes,E=f.product_url,S=f.product_image_url,C=f.product_name,j=f.associated_products,I=f.youtubeID,k=e.UserImage,N=e.UserVideo,R=(0,xe.useState)(window.innerHeight),P=R[0],T=R[1];(0,xe.useEffect)((function(){function e(){P!==window.innerHeight&&T(window.innerHeight)}return window.addEventListener("resize",e),function(){return window.removeEventListener("resize",e)}}),[P]);var A=null!=E&&(null!=S||null!=C)&&!0===d?j?o()(r=[{product_url:E,product_image_url:S,product_name:C}]).call(r,j):[{product_url:E,product_image_url:S,product_name:C}]:null,L=(0,_i.jsx)(wc,{isFlagged:l,flagMediaText:l?p.flagged:p.flagImage,handleFlagMedia:function(){return i(s)}}),O=!0===n?(0,_i.jsx)("div",{className:"pr-border-t pr-border-gray-300",children:(0,_i.jsxs)("div",{className:"pr-flex pr-flex-col",children:[(0,_i.jsxs)("div",{className:"pr-flex pr-justify-between pr-pt-4",children:[(0,_i.jsx)(bc,{viewport:"mobile",isHelpful:c,isUnhelpful:u,handleHelpfulVoting:a,helpfulVotes:b,notHelpfulVotes:x,mediaId:m}),L]}),(0,_i.jsxs)("div",{className:"pr-content-attribution pr-flex pr-self-center pr-pt-6 pr-text-xs",children:[p.poweredBy,(0,_i.jsx)(dc,{className:"pr-w-4 pr-h-4 pr-ml-1"})]})]})}):(0,_i.jsx)("div",{className:"pr-border-t pr-border-gray-300 pr-mt-6",children:(0,_i.jsxs)("div",{className:"pr-flex pr-justify-between pr-pt-6",children:[L,(0,_i.jsxs)("div",{className:"pr-content-attribution pr-flex pr-text-xs",children:[p.poweredBy,(0,_i.jsx)(dc,{className:"pr-w-4 pr-h-4 pr-ml-1"})]})]})});return(0,_i.jsxs)("div",{className:"pr-media-carousel__card pr-bg-white pr-w-screen",tabIndex:"-1",ref:t,style:{height:P},children:[(0,_i.jsxs)("div",{className:"pr-h-1/2 pr-w-screen",children:["image"===w&&(0,_i.jsx)(k,{src:v,alt:h,className:"pr-w-full pr-h-full pr-object-contain",width:400,height:400}),"cvideo"===w&&(0,_i.jsx)(N,{src:v,className:"pr-w-full pr-h-full pr-object-contain",controls:!0,preload:"metadata",width:400,height:400}),"yt"===w&&(0,_i.jsx)("iframe",{className:"pr-w-full pr-h-full pr-object-contain",src:"https://youtube.com/embed/"+I,title:"YouTube video "+I,width:400,height:400})]}),(0,_i.jsxs)("div",{className:"pr-p-4 pr-h-1/2 pr-overflow-auto",children:[(0,_i.jsx)(yc,{caption:h||y,author:g||_,expandReviewText:p.viewMore,condenseReviewText:p.viewLess}),(0,_i.jsx)(xc,{heading:p.shopProducts,shopProductsArray:A}),O]})]})})),Sc=xe.forwardRef((function(e,t){var r,n=e.allowHelpfulVoting,i=e.handleFlagMedia,a=e.handleHelpfulVoting,s=e.index,l=e.isFlagged,c=e.isHelpful,u=e.isUnhelpful,d=e.showShoppableLink,p=e.localizations,f=e.media,h=f.caption,m=f.id,v=f.image,g=f.username,_=f.nickname,y=f.headline,w=f.type,b=f.helpful_votes,x=f.not_helpful_votes,E=f.product_url,S=f.product_image_url,C=f.product_name,j=f.associated_products,I=f.youtubeID,k=e.UserImage,N=e.UserVideo,R=null!=E&&(null!=S||null!=C)&&!0===d,P=R?j?o()(r=[{product_url:E,product_image_url:S,product_name:C}]).call(r,j):[{product_url:E,product_image_url:S,product_name:C}]:null;return(0,_i.jsxs)("div",{className:vo()("pr-media-carousel__card pr-media-carousel__card--lg","pr-bg-white pr-fixed pr-flex",{"pr-p-8":R,"md:pr-px-28 pr-px-32 pr-py-8":!1===R}),tabIndex:"-1",ref:t,children:[(0,_i.jsxs)("div",{className:vo()("pr-bg-white pr-overflow-y-auto pr-overflow-x-hidden pr-w-96 md:pr-w-mediaDesktop",{"pr-mr-8":R}),children:[(0,_i.jsxs)("div",{className:"md:pr-w-mediaDesktop pr-h-mediaDesktop pr-w-96",children:["image"===w&&(0,_i.jsx)(k,{src:v,alt:h,className:"pr-w-full pr-h-full pr-object-contain",width:480,height:480}),"cvideo"===w&&(0,_i.jsx)(N,{src:v,className:"pr-w-full pr-h-full pr-object-contain",controls:!0,preload:"metadata",width:480,height:480}),"yt"===w&&(0,_i.jsx)("iframe",{className:"pr-w-full pr-h-full pr-object-contain",src:"https://youtube.com/embed/"+I,title:"YouTube video "+I,width:480,height:480})]}),(0,_i.jsxs)("div",{className:"pr-flex pr-flex-col pr-justify-between pr-h-40",children:[(0,_i.jsx)(yc,{caption:h||y,author:g||_,expandReviewText:p.viewMore,condenseReviewText:p.viewLess}),(0,_i.jsx)("div",{className:"pr-border-t pr-border-gray-300",children:(0,_i.jsxs)("div",{className:"pr-flex pr-items-center pr-justify-between pr-pt-6",children:[(0,_i.jsxs)("div",{className:"pr-flex pr-items-center",children:[!0===n&&(0,_i.jsx)(bc,{viewport:"desktop",isHelpful:c,isUnhelpful:u,handleHelpfulVoting:a,helpfulVotes:b,notHelpfulVotes:x,mediaId:m}),(0,_i.jsx)(wc,{isFlagged:l,flagMediaText:l?p.flagged:p.flagImage,handleFlagMedia:function(){return i(s)}})]}),(0,_i.jsxs)("div",{className:"pr-content-attribution pr-flex pr-text-xs",children:[p.poweredBy,(0,_i.jsx)(dc,{className:"pr-w-4 pr-h-4 pr-ml-1"})]})]})})]})]}),(0,_i.jsx)(xc,{heading:p.shopProducts,isLarge:!0,shopProductsArray:P})]})}));function Cc(e){var t,r,n=e.media,i=e.startingIndex,o=e.allowHelpfulVoting,a=e.handleCarouselChange,s=e.handleFlagMedia,l=e.handleHelpfulVoting,c=e.localizations,u=e.flaggedContent,p=e.helpfulContent,f=e.unhelpfulContent,h=e.showShoppableLink,m=e.UserImage,v=e.UserVideo,g=(0,xe.useRef)(),_=(0,xe.useRef)(),y=(0,xe.useState)(i),w=y[0],b=y[1],x=(0,xe.useState)(),E=x[0],S=x[1],C=(0,xe.useRef)(),j=(t=w,r=(0,xe.useRef)(),(0,xe.useEffect)((function(){r.current=t}),[t]),r.current);(0,xe.useEffect)((function(){var e=window.matchMedia("(max-width: 870px)");function t(e){e.matches?S(!0):S(!1)}return S(e.matches),e.addEventListener?(e.addEventListener("change",t),function(){return e.removeEventListener("change",t)}):(e.addListener(t),function(){return e.removeListener(t)})}),[]),(0,xe.useEffect)((function(){setTimeout((function(){var e;null===(e=C.current)||void 0===e||e.focus()}),1)}),[]),(0,xe.useEffect)((function(){var e,t;jw&&(0===w&&(null===(t=_.current)||void 0===t||t.focus()))}),[j,w,n.length]);var k=(0,dl.useSwipeable)({onSwipedLeft:function(){w+10&&b((function(e){return e-1}))},preventDefaultTouchmoveEvent:!0});return(0,_i.jsx)("div",{children:(0,_i.jsxs)("section",{id:"mediaCarousel",className:"pr-media-carousel pr-no-conflict pr-static","aria-roledescription":"carousel","aria-label":c.carouselLabel,onKeyDown:function(e){var t;if(37===e.keyCode&&0!==w)b((function(e){return e-1})),null===(t=g.current)||void 0===t||t.focus();else if(39===e.keyCode&&w+1!==n.length){var r;b((function(e){return e+1})),null===(r=_.current)||void 0===r||r.focus()}},children:[0!==w&&(0,_i.jsx)(_c,{ref:g,labelText:c.prevBtn,handleCarouselChange:function(){b((function(e){return e-1})),a&&a(w)},arrowDirection:"left"}),(0,_i.jsx)("div",{role:"group","aria-live":"polite","aria-roledescription":"slide","aria-label":c.slideLabel.replace("{0}",w+1).replace("{1}",n.length+1),children:E?(0,_i.jsx)("div",d()(d()({className:"pr-block"},k),{},{children:(0,_i.jsx)(Ec,{index:w,allowHelpfulVoting:o,handleFlagMedia:s,handleHelpfulVoting:l,isFlagged:(null==u?void 0:I()(u).call(u,Number(n[w].id)))>-1,isHelpful:(null==p?void 0:I()(p).call(p,Number(n[w].id)))>-1,isUnhelpful:(null==f?void 0:I()(f).call(f,Number(n[w].id)))>-1,showShoppableLink:h,localizations:c,media:n[w],UserImage:m,UserVideo:v,ref:C})})):(0,_i.jsx)("div",{className:"pr-flex pr-justify-center pr-items-center",children:(0,_i.jsx)(Sc,{index:w,allowHelpfulVoting:o,handleFlagMedia:s,handleHelpfulVoting:l,isFlagged:(null==u?void 0:I()(u).call(u,Number(n[w].id)))>-1,isHelpful:(null==p?void 0:I()(p).call(p,Number(n[w].id)))>-1,isUnhelpful:(null==f?void 0:I()(f).call(f,Number(n[w].id)))>-1,showShoppableLink:h,localizations:c,media:n[w],UserImage:m,UserVideo:v,ref:C})})}),w+1!==n.length&&(0,_i.jsx)(_c,{ref:_,labelText:c.nextBtn,handleCarouselChange:function(){b((function(e){return e+1})),a&&a(w)},arrowDirection:"right"})]})})}var jc={format:null,width:150,height:150,crop:"thumb",quality:"auto"},Ic=function(e){var t,r,n,i,a=e.config,s=e.review,l=e.localizations,c=e.merchantProperties,u=e.openMediaCard,p=(0,xe.useState)(!1),f=p[0],h=p[1],v=(0,xe.useState)(null),g=v[0],_=v[1],w=(0,xe.useState)(),b=w[0],x=w[1],E=(0,xe.useState)([]),S=E[0],C=E[1],j=(0,xe.useState)([]),I=j[0],k=j[1],N=(0,xe.useState)([]),R=N[0],P=N[1],T=(0,Se.v)(c,a).REVIEW_MEDIA_MODAL_STYLE,A=function(e){h(!0),_(e)},L=function(){h(!1),_(null)},O=m()(t=y()(r=m()(n=Yt()(i=s.media).call(i,(function(e,t){return e.type===t.type?0:"image"===e.type?-1:1}))).call(n,(function(e){return!(0,Bt.Fl)(e)}))).call(r,(function(e){if("image"===e.type)return e;if("video"===e.type){var t=(0,Gs.tk)(e.uri),r=null==t?"cvideo":"yt";return d()(d()({},e),{},{youtubeID:t,type:r})}}))).call(t,Boolean),D=y()(O).call(O,(function(e){return{id:e.id,rating:s.metrics.rating,headline:s.details.headline,image:e.uri,type:e.type,disclosure_code:e.disclosure_code,caption:e.caption,helpful_votes:e.helpful_votes,not_helpful_votes:e.not_helpful_votes,comments:s.details.comments,youtubeID:e.youtubeID}})),M=y()(O).call(O,(function(e,t){var r,n="pr-rd-image-container pr-rd-left pr-rd-no-caption",i=null;if("image"===e.type){var o=Gs.ZP.libraryUrl(e.uri,jc);e.caption&&(n="pr-rd-image-container pr-rd-left",i=(0,_i.jsx)("figcaption",{"aria-label":e.caption,children:e.caption})),r=(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)($s,{alt:s.details.headline,className:"pr-rd-image",src:o}),i]})}else{if("yt"!==e.type&&"cvideo"!==e.type)return null;r=(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)("img",{"aria-hidden":"true",src:$l,alt:(0,fo.ZP)("cd.common.media.play_video",l),className:"pr-rd-play-icon"}),"yt"===e.type?(0,_i.jsx)("img",{"aria-hidden":"true",src:"//img.youtube.com/vi/"+e.youtubeID+"/0.jpg",alt:(0,fo.ZP)("cd.common.media.play_video",l),className:"pr-rd-image"}):null,"cvideo"===e.type?(0,_i.jsx)($s,{"aria-hidden":"true",src:Gs.ZP.libraryVideoUrl(e.uri,jc),alt:(0,fo.ZP)("cd.common.media.play_video",l),className:"pr-rd-image"}):null]})}return(0,_i.jsx)("figure",{role:"button",onClick:u?function(){return u(D,t)}:function(){return A(t)},onKeyDown:function(e){return function(e,t){13!==e.keyCode&&32!==e.keyCode||A(t)}(e,t)},tabIndex:"0",className:n,children:r},"image-"+t)})),F=(0,_i.jsx)(Bc,{localizations:l,merchantProperties:c,config:a,media:D,startingIndex:g,handleClose:L});return"CARDV2"===T&&(F=(0,_i.jsx)(gc,{handleClose:L,closeBtnText:(0,fo.ZP)("review_display.4.0.modal.close_button_text",l),role:"dialog","aria-labelledby":"mediaCarousel",children:null!=b?(0,_i.jsx)("div",{className:"pr-media-carousel",children:(0,_i.jsx)(rc,{localizations:l,onClose:function(){_(b),x(null)},onSubmit:function(e){return(0,vr.Os)(d()(d()(d()({},e),a),{},{merchant_id:a.merchant_id,command:"flagugc",ugc_id:D[b].id})).then((function(){C(o()(S).call(S,Number(D[b].id))),_(b),x(null)}))}})}):(0,_i.jsx)(Cc,{media:D,startingIndex:g,showShoppableLink:!1,handleFlagMedia:function(e){x(e)},handleHelpfulVoting:function(e,t){return(0,vr.Os)(d()(d()({},a),{},{vote_type:t.toLowerCase(),command:"voteugc",ugc_id:e})).then((function(){"helpful"===t.toLowerCase()?k(o()(I).call(I,Number(e))):"unhelpful"===t.toLowerCase()&&P(o()(R).call(R,Number(e)))}))},flaggedContent:S,helpfulContent:I,unhelpfulContent:R,localizations:nc(l),UserImage:$s,UserVideo:Xs})})),(0,_i.jsxs)("section",{className:"pr-rd-images pr-rd-content-block",children:[M,f&&F]})},kc=function(e){var t=e.review,r=e.localizations,n="Yes"===t.details.bottom_line?(0,fo.ZP)("review_display.4.0.bottom_line.recommended",r):(0,fo.ZP)("review_display.4.0.bottom_line.not_recommended",r);return(0,_i.jsxs)("p",{className:"pr-rd-bottomline pr-rd-inner-content-block",children:[(0,_i.jsx)("span",{className:"pr-rd-bold",children:(0,fo.ZP)("review_display.4.0.bottom_line.bottom_line",r)}),(0,_i.jsx)("span",{children:" "+n})]})},Nc=r(23745),Rc=function(e){var t=e.flaggedContent,r=e.flagContent,n=e.config,i=e.localizations,o=e.onFlag,a=e.review,s=e["aria-describedby"],l=(0,xe.useState)(!1),c=l[0],u=l[1],d=(0,Nc.D)(c),p=(0,bi.dZ)(n.page_id,ul.yW),f=!0===d&&!1===c,h=(0,xe.useRef)(),m=function(e){e&&e.preventDefault(),u(!1)};(0,xe.useEffect)((function(){var e;f&&(null===(e=h.current)||void 0===e||e.focus())}),[f]);var v=-1!==I()(t).call(t,a.review_id),g=(0,fo.ZP)("review_display.4.0.flagging.flag_this_review",i);return(0,_i.jsxs)("div",{className:"pr-rd-flag-review-container",children:[v?(0,_i.jsxs)("div",{ref:h,tabIndex:"-1",children:[(0,_i.jsx)(Ps,{}),(0,_i.jsx)("p",{className:"pr-flag-review-thankyou",children:(0,fo.ZP)("review_display.4.0.flagging_form.already_flagged_text",i)})]}):(0,_i.jsx)("button",{"aria-describedby":s,className:"pr-rd-flag-review-btn",onClick:o?function(e){return o(e,a.review_id)}:function(e){e&&e.preventDefault(),u(!0),p(bi.GM.REVIEW_DISPLAY_FLAG(a.ugc_id))},ref:h,children:g}),c&&(0,_i.jsx)(Rs,{isCard:!0,"aria-label":"Flag review dialog",role:"dialog",localizations:i,handleClose:m,children:(0,_i.jsx)(rc,{localizations:i,onSubmit:function(e){return r(a.review_id,n,e)},onClose:m})})]})},Pc=function(e){var t=e.localizations,r=e.config,n=e.review,i=e.openOriginalReview,o=(0,xe.useState)(!1),a=o[0],s=o[1],l=function(){s((function(e){return!e}))};return(0,_i.jsxs)("div",{className:"pr-updated-review",children:[(0,fo.ZP)("review_display.4.0.updated_review.description_text",t),(0,_i.jsx)("button",{type:"button",className:"pr-updated-review-link",onClick:i||l,children:(0,fo.ZP)("review_display.4.0.updated_review.original_review_link_text",t)}),a&&(0,_i.jsx)(Rs,{localizations:t,handleClose:l,enableCloseButton:!0,enableBackgroundClose:!0,role:"dialog",children:(0,_i.jsx)(Wc,{config:r,showMedia:!1,showFlaggingAndHelpfulVoting:!1,singleReviewID:n.details.old_ugc_id})})]})},Tc=function(e){var t=e.config,r=e.localizations,n=e.review,i=e.flagContent,o=e.showFlaggingAndHelpfulVoting,a=e.helpfulContent,s=e.unhelpfulContent,l=e.flaggedContent,c=e.voteContent,u=e.onFlag,d=e.reviewHeadlineId,p=e.openOriginalReview,f=(0,xe.useRef)((0,Jo.x0)()),h=Bs(a,n.metrics.helpful_votes,n.ugc_id,(function(e){return(0,Jo.WU)((0,fo.ZP)("review_display.4.0.helpful.helpful_vote_label",r),e)})),m=Bs(s,n.metrics.not_helpful_votes,n.ugc_id,(function(e){return(0,Jo.WU)((0,fo.ZP)("review_display.4.0.helpful.unhelpful_vote_label",r),e)})),v=h.voted||m.voted,g=(0,bi.dZ)(t.page_id,ul.yW),_=function(e){var r;e===Ot?r=bi.GM.REVIEW_DISPLAY_HELPFUL:e===Dt&&(r=bi.GM.REVIEW_DISPLAY_UNHELPFUL),c(n.ugc_id,t,e),g(r(n.ugc_id))};return(0,_i.jsxs)("footer",{className:"pr-rd-footer pr-rd-content-block",children:[n.details.bottom_line&&(0,_i.jsx)(kc,{review:n,localizations:r}),o&&(0,_i.jsx)("div",{className:"pr-rd-helpful-action",children:(0,_i.jsxs)("div",{className:"pr-rd-helpful-action-group",children:[(0,_i.jsx)("div",{className:"pr-rd-helpful-action-legend",children:(0,_i.jsx)("span",{className:"pr-rd-helpful-text pr-rd-bold",id:f.current,children:(0,fo.ZP)("review_display.4.0.helpful.helpful_question",r)})}),(0,_i.jsxs)(Hs,{className:"pr-rd-helpful-action-btn-group",voted:v,votedLabel:(0,fo.ZP)("review_display.4.0.helpful.already_voted",r),votedMessage:(0,fo.ZP)("review_display.4.0.helpful.thank_you",r),"aria-labelledby":f.current,"aria-describedby":d,children:[(0,_i.jsx)(Ks,{type:Ot,voted:h.voted,count:h.count,"aria-label":h.label,onClick:_}),(0,_i.jsx)(Ks,{type:Dt,voted:m.voted,count:m.count,"aria-label":m.label,onClick:_})]}),(0,_i.jsx)(Rc,{config:t,review:n,localizations:r,flaggedContent:l,onFlag:u,flagContent:i,"aria-describedby":d})]})}),n.details.old_ugc_id&&(0,_i.jsx)(Pc,{config:t,localizations:r,review:n,openOriginalReview:p})]})};Tc.defaultProps={showFlaggingAndHelpfulVoting:!0};var Ac=Tc,Lc=function(e,t){var r=e.config,n=e.merchantProperties,i=e.localizations,o=e.productKey,a=e.review,s=e.showMedia,l=e.flaggedContent,c=e.helpfulContent,u=e.unhelpfulContent,p=e.voteContent,f=e.flagContent,h=e.onFlag,v=e.showFlaggingAndHelpfulVoting,g=e.propertiesByKey,_=e.openOriginalReview,y=e.openMediaCard,w=e.headline,b=e.comments,x=e.reviewTranslation,E=(0,Se.v)(n,r),S=E.REVIEW_DISPLAY_LIST_TYPE,C=E.ENABLE_DEMOGRAPHIC_DISPLAY,j=E.CD4_DEMOGRAPHIC_DISPLAY_KEYS,k=E.PAGE_ID,N=E.CD4_REVIEW_DETAILS_LAYOUT,R=(0,bi.dZ)(k,ul.yW),P="CONDENSED"===S,T="pr-rd-review-headline-"+a.review_id,A=function(e,t,r){var n,i,o=Ni()(n=Yt()(i=m()(e).call(e,(function(e){return t&&I()(r).call(r,e.key)>-1}))).call(i,(function(e,t){return I()(r).call(r,e.key)-I()(r).call(r,t.key)}))).call(n,0,3),a=m()(e).call(e,(function(e){return-1===I()(o).call(o,e)}));return{demographicProperties:o,msqProperties:a}}(a.details.properties||[],C,(0,Jo.iA)(j)),L=A.demographicProperties,O=A.msqProperties,D=function(e,t){return{empty:{root:{},title:{},body:{},datePublished:{},authorRoot:{},authorName:{},locationRoot:{},locationName:{},ratingRoot:{},ratingValue:{}},root:{itemScope:!0,itemType:"http://schema.org/Review",itemRef:"pr-"+t},title:{itemProp:"name"},body:{itemProp:"reviewBody"},datePublished:{itemProp:"datePublished"},authorRoot:{itemScope:!0,itemType:"http://schema.org/Person",itemProp:"author"},authorName:{itemProp:"name"},locationRoot:{itemScope:!0,itemType:"http://schema.org/AdministrativeArea",itemProp:"locationCreated"},locationName:{itemProp:"name"},ratingRoot:{itemScope:!0,itemType:"http://schema.org/Rating",itemProp:"reviewRating"},ratingValue:{itemProp:"ratingValue",content:e.metrics.rating}}}(a,r.structured_data_product_id||o);D=(0,Bt.x9)(r,n).showMicrodata?D:D.empty;var M=(0,xe.useRef)(),F=(0,xe.useRef)();if((0,xe.useImperativeHandle)(t,(function(){return{focus:function(){(0,Nt.GZ)(M.current,500),F.current.focus()},get domNode(){return F.current}}})),!a.isVisible)return null;var z=s?(0,_i.jsx)(Ic,{config:r,review:a,localizations:i,merchantProperties:n,openMediaCard:y}):null,V=(0,_i.jsx)(Ac,{config:r,merchantProperties:n,review:a,localizations:i,flaggedContent:l,helpfulContent:c,unhelpfulContent:u,voteContent:p,flagContent:f,onFlag:h,showFlaggingAndHelpfulVoting:v,reviewHeadlineId:T,openOriginalReview:_}),q=xe.cloneElement(b,{merchantProperties:n,isCondensed:P,microdata:D}),W=(0,_i.jsx)(Nl,{localizations:i,review:a,merchantProperties:n,productName:r.product_name}),U=xe.cloneElement(w,{microdata:D,ref:F}),Z=(0,_i.jsxs)(Yl,{localizations:i,review:a,merchantProperties:n,isCondensed:P,msqProperties:O,sendBeacon:R,propertiesByKey:g,children:[z,V]});return"FLEX"===N&&!0!==P?(0,_i.jsx)(Oc,{headline:U,description:(0,_i.jsx)(kl,{className:"pr-rd-side-content-block-flex",localizations:i,merchantProperties:n,review:a,microdata:D,demographicProperties:L,config:r}),comments:q,commentsFor:W,reviewPieces:Z}):(0,_i.jsxs)("div",d()(d()({},D.root),{},{className:vo()("pr-review",{"pr-review-condensed":P}),ref:M,children:[U,(0,_i.jsx)("section",{className:"pr-rd-description pr-rd-content-block",children:(0,_i.jsxs)(kl,{className:"pr-rd-side-content-block pr-rd-right",localizations:i,merchantProperties:n,review:a,microdata:D,demographicProperties:L,children:[W,q,x]})}),Z]}))};function Oc(e){var t=e.headline,r=e.reviewPieces,n=e.comments,i=e.commentsFor,o=e.description;return(0,Qi.e4)()<980?(0,_i.jsxs)("div",{className:"pr-review-flex-mobile",children:[t,o,(0,_i.jsxs)("section",{className:"pr-rd-description pr-rd-content-block",children:[n,i]}),r]}):(0,_i.jsxs)("div",{className:"pr-review-flex",children:[(0,_i.jsxs)("div",{className:"pr-rd-flex",children:[t,(0,_i.jsxs)("section",{className:"pr-rd-description pr-rd-content-block",children:[n,i]}),r]}),o]})}(Lc=xe.forwardRef(Lc)).defaultProps={showMedia:!0,showFlaggingAndHelpfulVoting:!0};var Dc=Lc,Mc=function(e,t){var r=e.localizations,n=e.microdata,i=e.headline,o=void 0===i?"":i,a=e.rating,s=e.reviewId,l=e.lang,c=(0,Ui.ZR)(),u=c.DISABLE_CD4_HEADING_STRUCTURES,p=c.STAR_STYLES;return null==o?null:(0,_i.jsxs)("header",{className:"pr-rd-header pr-rd-content-block",children:[(0,_i.jsx)("div",d()(d()({},n.ratingRoot),{},{className:"pr-rd-star-rating",children:(0,_i.jsx)("div",d()(d()({},n.ratingValue),{},{children:(0,_i.jsx)(xo,{isInteractive:!1,preset:a,ratingValue:a,starStyles:p,ratingLabel:(0,zl.W)((0,fo.ZP)("review_display.4.0.common.rated_x_out_of_y",r),a)})}))})),(0,_i.jsx)(Zi.X6,d()(d()({importance:2},n.title),{},{shouldUseSpan:u,className:"pr-rd-review-headline",ref:t,tabIndex:-1,"data-testid":"headline-"+s,id:"pr-rd-review-headline-"+s,lang:l,children:o}))]})};Mc=xe.forwardRef(Mc);var Fc=function(e){var t=e.merchantProperties.REVIEW_DISPLAY_DESCRIPTION_CHARACTER_COUNT,r=e.isCondensed,n=e.comments,i=e.microdata,o=e.lang,a=(0,xe.useState)(!1),s=a[0],l=a[1],c=Wi()(t,10)>0?Wi()(t,10):0;return r&&c>0&&n.length>c?(0,_i.jsxs)("p",{className:"pr-rd-description-text",lang:o,children:[(0,_i.jsx)("span",d()(d()({},i.body),{},{children:s?n:n.substring(0,c)+"..."})),(0,_i.jsx)("button",{type:"button",className:"pr-rd-show-more-description-btn",onClick:function(){l((function(e){return!e}))},children:s?"[ - ]":"[ + ]"})]}):(0,_i.jsx)("p",d()(d()({},i.body),{},{className:"pr-rd-description-text",lang:o,dangerouslySetInnerHTML:{__html:n}}))},zc=[{name:"pr-rd-display-tablet",width:780}],Vc=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a=i-o)},ref:s,className:"pr-irlsnippet-images",style:{height:w},children:function(){if(!c)return(0,_i.jsx)(nu,{count:g-p.length>0?Math.min(g-p.length,_):_,size:w});var e=(0,fo.ZP)("review_display.4.0.image_display.gallery_image.alt_text",f),t=(0,fo.ZP)("cd.common.media.play_video",f);return(0,_i.jsxs)(_i.Fragment,{children:[y()(p).call(p,(function(r,n){return(0,_i.jsxs)("button",{className:"pr-irlsnippet-image-container pr-btn-reset",onClick:function(e){return h(n,e.currentTarget)},children:[(0,_i.jsx)($s,{alt:(0,zl.W)(e,"#"+(n+1)),className:"pr-irlsnippet-image",src:$s.urlFromMedia(r,w,eu),style:{width:w,height:w}}),"cvideo"===r.type&&(0,_i.jsx)("img",{className:"pr-irlsnippet-play-btn",src:$l,alt:t}),"social_instagram"===r.source&&(0,_i.jsx)(Ls,{className:"pr-irlsnippet-instagram-icon",showWhite:!0})]},""+r.id+n)})),v?(0,_i.jsx)(nu,{count:g-p.length>0?Math.min(g-p.length,_):_,size:w}):null]})}()}),(0,_i.jsx)(ru,{direction:"right",disabled:o,onClick:x}),b]})}function ru(e){var t=e.direction,r=e.disabled,n=e.onClick;return(0,_i.jsx)("button",{type:"button","aria-label":"scroll media "+t,disabled:r,className:"left"===t?"pr-irlsnippet-leftbtn":"pr-irlsnippet-rightbtn",onClick:function(){return n(t)},children:(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"6",strokeColor:r?"grey":"#333"})})}function nu(e){for(var t=e.count,r=e.size,n=[],i=0;ih;t.length%s==0&&e&&p===Math.floor(t.length-.75*s)&&r(t.length)}));var x=(0,dl.useSwipeable)({onSwipedLeft:function(){p+1<=t.length-v&&f((function(e){return e+1}))},onSwipedRight:function(){p>0&&f((function(e){return e-1}))},preventDefaultTouchmoveEvent:!0});var E,S=(0,Jo.Ip)("review_display.4.0.image_display.gallery_image.alt_text",a),C=(0,Jo.Ip)("cd.common.media.play_video",a);return(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsxs)("div",{className:"pr-sgl",onKeyDown:function(e){39===e.keyCode?f((function(e){return e+1})):37===e.keyCode&&f((function(e){return e-1}))},tabIndex:"0","data-testid":"scroll-gallery--large",ref:b,children:[(0,_i.jsx)("button",{type:"button",className:"pr-sgl_pagination-btn pr-sgl_pagination-btn--prev","aria-label":"Previous",disabled:0===p,style:{width:50},onClick:function(){f((function(e){return e-1}))},children:(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"3",strokeColor:"#333"})}),_?(0,_i.jsx)("div",d()(d()({className:"pr-sgl_window",ref:c,style:{width:294*v}},x),{},{children:(0,_i.jsx)("ul",{className:"pr-sgl_list",style:{transform:"translate3d("+-294*p+"px,0,0)"},children:(E=y()(t).call(t,(function(e,t){var r=(0,Jo.WU)(S,"#"+(t+1));return(0,_i.jsx)("li",{className:"pr-sgl_list_item",style:{borderLeftWidth:2,borderRightWidth:2},children:(0,_i.jsxs)("button",{type:"button",className:"pr-sgl_modal-btn",onClick:function(e){return n(t,e.currentTarget)},tabIndex:-1,children:[(0,_i.jsx)($s,{alt:r,className:"pr-sgl_thumbnail",src:au(e.uri,e.type),style:{width:iu,height:iu,backgroundColor:"#dadada"}}),"cvideo"===e.type&&(0,_i.jsx)("img",{className:"pr-sgl_play-icon",src:$l,alt:C}),"social_instagram"===e.source&&(0,_i.jsx)(Ls,{className:"pr-sgl-instagram-icon",showWhite:!0})]})},e.id+"-"+t)})),l&&(E=o()(E).call(E,(0,_i.jsx)(su,{visibleImagesCount:s}))),E)})})):(0,_i.jsx)("ul",{className:"pr-sgl_list",children:(0,_i.jsx)(su,{visibleImagesCount:v})}),(0,_i.jsx)("button",{type:"button",className:"pr-sgl_pagination-btn pr-sgl_pagination-btn--next","aria-label":"Next",style:{width:50},disabled:p>=t.length-v&&!0!==l,onClick:function(){f((function(e){return e+1}))},children:(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"3",strokeColor:"#333"})})]}),i]})}function au(e,t){return"cvideo"===t?Jo.$A.libraryVideoUrlSet(e).thumb_high_res:Jo.$A.libraryUrlSet(e).thumb_high_res}function su(e){for(var t=e.visibleImagesCount,r=[],n=0;n=710?(t-32)/8:(t-16)/4,gridImageGroupSize:16}:{gridImageSize:i,gridImageGroupSize:2*r}}function du(e){var t=e.imageSize,r=e.imageGroupSize,n=e.media,i=e.openModal,o=e.modal,a=e.localizations,s=e.onFetchMoreMedia,l=e.totalMedia,c=e.galleryType,u=(0,xe.useState)(),d=u[0],p=u[1],f=(0,xe.useRef)(null),h=(0,xe.useState)(1),m=h[0],v=h[1],g=(0,Jo.D9)(m),_=(0,xe.useState)(!1),w=_[0],b=_[1],x=(0,Qi.rP)(b).ref;(0,xe.useEffect)((function(){gm&&p(0)}),[m,g,r]),(0,xe.useEffect)((function(){f.current&&f.current.focus()}),[d]);var E=l>m*r?(0,Jo.Ip)("review_display.4.0.image_display.show_more",a):(0,Jo.Ip)("review_display.4.0.image_display.collapse",a),S=(0,Jo.Ip)("review_display.4.0.image_display.gallery_image.alt_text",a),C="GRID"===c?{width:t,height:t,objectFit:"cover",objectPosition:"center top"}:{width:t,height:t};return(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)("div",{className:"pr-ggl",ref:x,children:function(){var e,o=y()(e=Ni()(n).call(n,0,m*r)).call(e,(function(e,r){var n=(0,Jo.WU)(S,"#"+(r+1));return!1===w?(0,_i.jsx)("div",{className:"pr-ggl_placeholder",style:{width:t,height:t}},r):(0,_i.jsxs)("button",{className:"pr-ggl_image-btn",onClick:function(e){return i(Number(r),e.currentTarget)},type:"button",ref:d===r?f:null,children:[(0,_i.jsx)($s,{alt:n,src:pu(e.uri,e.type,c),style:C}),"cvideo"===e.type&&(0,_i.jsx)("img",{src:$l,className:"pr-ggl_image-btn-play-icon",alt:(0,Jo.Ip)("cd.common.media.play_video",a)}),"social_instagram"===e.source&&(0,_i.jsx)("div",{className:"pr-ggl_image-btn-instagram-icon",style:{width:t/8,height:t/8},children:(0,_i.jsx)(Ls,{showWhite:!0})})]},r)}));return o}()}),l>r&&(0,_i.jsxs)("button",{type:"button",className:"pr-ggl_show-more-btn-container",onClick:l>m*r?function(){n.length===l?v((function(e){return e+1})):s(m*r).then((function(){v((function(e){return e+1}))}))}:function(){return v(1)},children:[(0,_i.jsx)("div",{className:"pr-ggl_show-more-icon",children:(0,_i.jsx)(cu,{})}),E]}),o]})}function pu(e,t,r){if("GRID"===r){var n={gravity:"auto",crop:"fill",zoom:.5,height:400,format:null};return"cvideo"===t?Jo.$A.libraryVideoUrlSet(e,n).full:Jo.$A.libraryUrlSet(e,n).full}return"cvideo"===t?Jo.$A.libraryVideoUrlSet(e,{format:null}).thumb_high_res:Jo.$A.libraryUrlSet(e,{format:null}).thumb_high_res}var fu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:1,height:1},{xCoord:4,yCoord:0,width:2,height:2},{xCoord:0,yCoord:1,width:2,height:1},{xCoord:2,yCoord:1,width:1,height:1},{xCoord:3,yCoord:1,width:1,height:1}],hu=[{xCoord:0,yCoord:0,width:2,height:2},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:1,height:1},{xCoord:4,yCoord:0,width:1,height:1},{xCoord:5,yCoord:0,width:1,height:1},{xCoord:2,yCoord:1,width:1,height:1},{xCoord:3,yCoord:1,width:1,height:1},{xCoord:4,yCoord:1,width:2,height:1}],mu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1},{xCoord:1,yCoord:1,width:1,height:1},{xCoord:2,yCoord:1,width:1,height:1},{xCoord:3,yCoord:1,width:1,height:1}],vu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:2,height:2},{xCoord:4,yCoord:0,width:2,height:1},{xCoord:0,yCoord:1,width:2,height:1},{xCoord:4,yCoord:1,width:1,height:1},{xCoord:5,yCoord:1,width:1,height:1}],gu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1},{xCoord:1,yCoord:1,width:1,height:1},{xCoord:2,yCoord:1,width:1,height:1}],_u=[{xCoord:0,yCoord:0,width:2,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:2,height:1},{xCoord:5,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1},{xCoord:1,yCoord:1,width:2,height:1}],yu=[{xCoord:0,yCoord:0,width:2,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1},{xCoord:2,yCoord:1,width:2,height:1},{xCoord:0,yCoord:2,width:2,height:1},{xCoord:2,yCoord:2,width:1,height:1}],wu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1},{xCoord:1,yCoord:1,width:1,height:1}],bu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:2,height:1},{xCoord:4,yCoord:0,width:1,height:1},{xCoord:5,yCoord:0,width:1,height:1}],xu=[{xCoord:0,yCoord:0,width:2,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1},{xCoord:2,yCoord:1,width:2,height:1},{xCoord:0,yCoord:2,width:1,height:1}],Eu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1}],Su=[{xCoord:0,yCoord:0,width:2,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:2,height:1},{xCoord:5,yCoord:0,width:1,height:1}],Cu=[{xCoord:0,yCoord:0,width:2,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:0,yCoord:1,width:1,height:1},{xCoord:2,yCoord:1,width:2,height:1}],ju=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:1,height:1},{xCoord:3,yCoord:0,width:1,height:1}],Iu=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1},{xCoord:2,yCoord:0,width:1,height:1}],ku=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:1,height:1}],Nu=[{xCoord:0,yCoord:0,width:2,height:1},{xCoord:2,yCoord:0,width:1,height:1}],Ru=[{xCoord:0,yCoord:0,width:1,height:1},{xCoord:1,yCoord:0,width:2,height:1}],Pu=[{xCoord:0,yCoord:0,width:1,height:1}],Tu={gravity:"auto",crop:"fill",zoom:.5,height:400,format:null},Au=["#BBE4DE","#F8AF91","#C6E3A0","#FFDC8A","#d1d1e1","#C6E3A0","#BBE4DE","#F8AF91"],Lu=function(e){var t,r=e.gridContainerWidth,n=e.maxColumns,i=e.margin,o=e.elHeight,a=e.mediaGroup,s=e.onOpenModal,l=e.localizations,c=e.rowIndex,u=e.maxMediaPerFrame,d=!1,p=(0,xe.useState)(!1),f=p[0],h=p[1],m=y()(t=function(e){var t=e.mediaGroup,r=e.rowIndex,n=e.maxColumns,i=!(r%2);switch(t.length){case 8:return 4===n?mu:i?fu:hu;case 7:return 4===n?gu:vu;case 6:return 4===n?wu:3===n?yu:_u;case 5:return 4===n?Eu:3===n?xu:bu;case 4:return 4===n?ju:3===n?Cu:Su;case 3:return Iu;case 2:return 3!==n?ku:i?Ru:Nu;default:return Pu}}(e)).call(t,(function(e,t){var p=e.width*(r/n)-i,h=e.height*o-i,m=e.xCoord*(r/n),v=e.yCoord*o,g=a[t],_="cvideo"===g.type?Gs.ZP.libraryVideoUrlSet(g.image,Tu).full:Gs.ZP.libraryUrlSet(g.image,Tu).full;(e.yCoord>0||h>o)&&(d=!0);var y={height:h,width:p,left:m,top:v,position:"absolute",overflow:"hidden"},w=(0,zl.W)((0,fo.ZP)("review_display.4.0.image_display.gallery_image.alt_text",l),"#"+(c*u+t+1));return!1===f?(0,_i.jsx)("div",{className:"pr-rid-placeholder",style:y},"coord-"+t):(0,_i.jsxs)("button",{style:y,className:"pr-rid-tile pr-rid-tile-overlay pr-btn-reset",onClick:function(e){return s(g.id,e.currentTarget)},children:[(0,_i.jsxs)("div",{style:{backgroundColor:Au[t],display:"flex"},className:"pr-rid-tile-image",children:[(0,_i.jsx)($s,{alt:w,style:{minWidth:"100%",minHeight:"100%",objectFit:"cover",objectPosition:"center top"},src:_}),"cvideo"===g.type&&(0,_i.jsx)("img",{height:h/2+"px",src:$l,alt:(0,fo.ZP)("cd.common.media.play_video",l),className:"pr-rd-play-icon"}),"social_instagram"===g.source&&(0,_i.jsx)("div",{className:"pr-rid-tile-image-instagram",children:(0,_i.jsx)(Ls,{showWhite:!0})})]}),(0,_i.jsx)("div",{className:"pr-rid-tile-image-title",children:g.headline})]},"coord-"+t)})),v=d?2*o:o;return(0,_i.jsx)(Qi.BS,{as:"section",onChange:h,style:{position:"relative",width:"100%",height:v+"px"},children:m})},Ou=[{name:"pr-rid-large",width:980},{name:"pr-rid-medium",width:780},{name:"pr-rid-small",width:1}],Du=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a=980?(i=6,o=3,a=150,s=8):t>780?(i=4,o=3,a=125,s=4):(i=3,o=2,a=100,s=2)),r.setState({currentClass:e,gridContainerWidth:t,maxColumns:i,margin:o,elHeight:a,maxImages:s})})),po()(co()(r),"openModal",(function(e,t){for(var n=0,i=0;ithis.state.mediaShowing,a=o?(0,fo.ZP)("review_display.4.0.image_display.show_more",r):(0,fo.ZP)("review_display.4.0.image_display.collapse",r),s=vo()("pr-rid-btn-container",{"pr-hide":n<=8});return(0,_i.jsx)(Qi.iX,{sizes:Ou,callback:this.onContainerClassChange,children:(0,_i.jsxs)("section",{id:"pr-image-display",className:"pr-rid",ref:function(t){e.gridContainer=t},children:[this.renderGridRows(),(0,_i.jsx)("button",{type:"button",className:s,onClick:o?this.showMore:this.collapse,children:(0,_i.jsxs)("div",{className:"pr-rid-btn",children:[(0,_i.jsx)(cu,{}),(0,_i.jsx)("span",{className:"pr-rid-btn-text",children:a})]})}),i]})})},t}(xe.Component);po()(Du,"defaultProps",{onShowMore:function(){return N().resolve()},allowHelpfulVoting:!0,allowReadReview:!0});var Mu=Du,Fu=function(e){var t=e.config,r=e.pwrPageSize,n=e.category,i=e.hashtags,o=e.nextPage,a=e.shownative,s=d()(d()({},t),{},{page_id:null,pwrPageSize:r,category:"string"==typeof n?encodeURIComponent(n):n,hashtags:i,noConfig:!0});return!0!==a&&(s.filter="Social"),(o?mr(o,s):hr("media",s)).then((function(e){var r,n;if(e.error||e.status_code&&200!==e.status_code)throw new Error(e.error||"Error fetching media");null!==(r=t.hooks)&&void 0!==r&&r.shoppableLink&&(e=zu(null===(n=t.hooks)||void 0===n?void 0:n.shoppableLink,e,t));return e}))},zu=function(e,t,r){var n,i=null===(n=t.results)||void 0===n?void 0:y()(n).call(n,(function(t){var n,i;return Array.isArray(t.associated_products)?(n=y()(i=t.associated_products).call(i,(function(t){return d()(d()({},t),e(t,r))})),d()(d()(d()({},t),e({product_image_url:t.product_image_url,product_name:t.product_name,product_url:t.product_url},r)),{},{associated_products:n})):d()(d()({},t),e({product_image_url:t.product_image_url,product_name:t.product_name,product_url:t.product_url},r))}));return d()(d()({},t),{},{results:i})},Vu=r(67121),qu=r.n(Vu),Wu=r(3613),Uu=r(4394),Zu=r(20638),Bu=r(61329),Hu=r(91171),Ku=function(e){var t=e.label,r=e.onChange,n=xe.createRef();return(0,_i.jsxs)("div",{className:"pr-file-input-btn",children:[(0,_i.jsx)("input",{ref:n,id:"pr-syp-modal",onChange:r,accept:"image/*",type:"file",style:{display:"none"}}),(0,_i.jsxs)("button",{className:"pr-btn pr-btn-default pr-btn-fileinput",onClick:function(){return n.current.click()},children:[(0,_i.jsx)(Zu.Z,{"aria-hidden":!0})," ",t]})]})},Gu=function(e){var t=e.onClick;return(0,_i.jsx)("div",{className:"pr-file-input-btn",children:(0,_i.jsxs)("button",{type:"button",onClick:t,className:"pr-btn pr-btn-default pr-btn-fileinput pr-file-input-btn pr-facebook-btn",children:[(0,_i.jsx)(Bu.Z,{focusable:"false","aria-hidden":!0})," Facebook"]})})},Qu=function(e){var t=e.onClick;return(0,_i.jsx)("div",{className:"pr-file-input-btn",children:(0,_i.jsxs)("button",{type:"button",onClick:t,className:"pr-btn pr-btn-default pr-btn-fileinput pr-file-input-btn pr-instagram-btn",children:[(0,_i.jsx)(Hu.Z,{focusable:"false","aria-hidden":!0})," Instagram"]})})},Yu=r(46815),$u=function(e){var t=e.label,r=e.required,n=e.isValid,i=e.fieldType,o=e.maxLength,a=e.onChange,s=e.value;return(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsxs)("label",{htmlFor:"pr-"+t+"-input",className:vo()("pr-syp_field-group-label",{"pr-syp_field-group-label-invalid":!1===n}),children:[t,r&&(0,_i.jsx)("abbr",{className:"pr-required-indicator",title:"required",children:"*"})]}),(0,_i.jsxs)(ec.X,{children:[(0,_i.jsx)("input",{id:"pr-"+t+"-input",name:t,className:vo()("pr-syp_textinput pr-textinput pr-form-control form-control",{"pr-syp_has-error":!1===n}),type:i,maxLength:o,required:r,value:s,onChange:a}),!1===n?(0,_i.jsx)(ec.N,{}):null]})]})};function Xu(e){var t=(0,xe.useState)((function(){return window.matchMedia(e).matches})),r=t[0],n=t[1];return(0,xe.useEffect)((function(){var t=window.matchMedia(e),r=function(e){n(e.matches)};return"addEventListener"in t?(t.addEventListener("change",r),function(){t.removeEventListener("change",r)}):(t.addListener(r),function(){t.removeListener(r)})}),[e]),r}var Ju,ed,td,rd,nd,id,od,ad,sd,ld,cd,ud,dd,pd,fd,hd,md,vd,gd,_d,yd=r(51164);var wd=function(e){var t=e.localizations,r=e.handleClose,n=e.config,i=function(e){return(0,fo.ZP)(""+e[0],t)};var o,a=(0,xe.useState)(),s=a[0],l=a[1],c=(0,xe.useState)("uploadMedia"),u=c[0],p=c[1],f=(0,xe.useState)((function(){return{caption:{label:i(Ju||(Ju=qu()(["review_display.4.0.share_your_photo.manage.fields.caption"]))),type:"text",isValid:void 0,value:""},name:{label:i(ed||(ed=qu()(["review_display.4.0.share_your_photo.manage.fields.name"]))),type:"text",isValid:void 0,value:"",required:!0,maxLength:40},email:{label:i(td||(td=qu()(["review_display.4.0.share_your_photo.manage.fields.email"]))),type:"email",isValid:void 0,value:""},location:{label:i(rd||(rd=qu()(["review_display.4.0.share_your_photo.manage.fields.location"]))),type:"text",isValid:void 0,value:"",maxLength:40}}})),h=f[0],m=f[1],v=(0,xe.useRef)(null),_=(0,xe.useRef)((0,Ms.x)()).current,w=(0,xe.useState)(!1),b=w[0],x=w[1],E=Xu("(max-width: 600px)"),S=(0,xe.useContext)(yd.uL),C=function(e){var t=e.target,r=t.name,n=t.value;m((function(e){var t=d()({},e);return t[r].value=n,t[r].isValid=!0,t}))},j=function(e){v.current=window.open(function(e){if("facebook"!==e&&"instagram"!==e)throw new Error("Unsupported app: "+e);return"facebook"===e?"https://ui.powerreviews.com/stable/social/facebookshare.html":"instagram"===e?"https://ui.powerreviews.com/stable/social/instagramshare.html":void 0}(e),"_blank")},I=(0,xe.useCallback)((function(e){if(e.data.media){var t=e.data.media[0],r={source:t.imageSrc,caption:t.caption,name:t.imageSrc,lastModified:(new Date).toISOString(),type:""};m((function(e){var r=d()({},e);return r.caption.value=t.caption,r})),p("addMediaInformation"),(0,Sn.$i)(r,"IMAGE").then((function(e){l({rawUrl:e.raw.url,thumbnailUrl:e.raw.url.replace("upload/","upload/f_auto,w_150,h_150,q_90,c_pad,a_0/")})})),v.current&&v.current.close()}}),[]);if((0,xe.useEffect)((function(){return window.addEventListener("message",I),function(){window.removeEventListener("message",I)}}),[I]),"uploadMedia"===u)o=(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsxs)("section",{"aria-describedby":_,children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:1,className:"pr-syp_header",children:i(od||(od=qu()(["review_display.4.0.share_your_photo.upload.heading"])))})}),(0,_i.jsx)("div",{id:_,className:"pr-syp_subheader",children:i(ad||(ad=qu()(["review_display.4.0.share_your_photo.upload.subheading"])))})]}),(0,_i.jsx)("div",{className:"pr-syp_media-inputs",children:(0,_i.jsxs)("div",{className:"pr-file-input-btn-group",children:[(0,_i.jsx)(Ku,{label:i(sd||(sd=qu()(["review_display.4.0.share_your_photo.upload.button_label"]))),onChange:function(e){var t=e.target.files[0];p("addMediaInformation"),(0,Sn.$i)(t,"IMAGE").then((function(e){var t=e.raw,r=t.url,n=t.publicId,i=t.deleteToken;l({rawUrl:r,thumbnailUrl:r.replace("upload/","upload/f_auto,w_150,h_150,q_90,c_pad,a_0/"),publicId:n,deleteToken:i})}))}}),(0,_i.jsx)(Gu,{onClick:function(){return j("facebook")}}),(0,_i.jsx)(Qu,{onClick:function(){return j("instagram")}})]})})]});else if("addMediaInformation"===u){var k;o=(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsxs)("section",{"aria-describedby":_,children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:1,className:"pr-syp_header",children:i(ld||(ld=qu()(["review_display.4.0.share_your_photo.manage.heading"])))})}),(0,_i.jsx)("div",{id:_,className:"pr-syp_subheader",children:i(cd||(cd=qu()(["review_display.4.0.share_your_photo.manage.subheading"])))})]}),s?(0,_i.jsxs)("div",{className:"pr-syp_image",children:[(0,_i.jsx)("div",{className:"pr-syp_image-thumbnail-wrapper",children:(0,_i.jsx)("img",{src:s.thumbnailUrl,alt:i(ud||(ud=qu()(["review_display.4.0.share_your_photo.manage.image_alt_tag"])))})}),(0,_i.jsxs)("div",{className:"pr-syp_image-controls",children:[(0,_i.jsx)("button",{className:"pr-syp_image-controls-btn",onClick:function(){l(""),p("uploadMedia"),(0,Sn.$s)(s)},"aria-label":i(dd||(dd=qu()(["review_display.4.0.share_your_photo.manage.remove.button_label"]))),children:(0,_i.jsx)(Uu.Z,{"aria-hidden":"true",focusable:"false"})}),(0,_i.jsx)("button",{className:"pr-syp_image-controls-btn",onClick:function(){var e=(s.rotation||0)+90;360===e&&(e=0),l(d()(d()({},s),{},{thumbnailUrl:s.thumbnailUrl.replace("a_"+(s.rotation||0)+"/","a_"+e+"/"),rotation:e}))},"aria-label":i(pd||(pd=qu()(["review_display.4.0.share_your_photo.manege.rotate.button_label"]))),children:(0,_i.jsx)(Wu.Z,{"aria-hidden":"true",focusable:"false"})})]})]}):(0,_i.jsx)(fl.Z,{className:"pr-syp_loading-indicator",isVisible:!0}),(0,_i.jsx)("div",{className:vo()("pr-syp_field-group",{"pr-syp_field-group-mobile":E}),children:y()(k=g()(h)).call(k,(function(e){return(0,_i.jsx)($u,d()(d()({},h[e]),{},{onChange:C}),e)}))}),(0,_i.jsxs)("div",{className:vo()("pr-syp_submit",{"pr-syp_submit-mobile":E}),children:[(0,_i.jsx)("p",{className:"pr-subscript",children:i(fd||(fd=qu()(["review_display.4.0.share_your_photo.manage.legal"])))}),(0,_i.jsx)("button",{type:"submit",className:"pr-syp_submit-btn pr-btn pr-btn-default pr-accessible-btn",onClick:function(e){for(var t={},r=[],o=function(){var e=l[a],n=h[e],o=n.isValid,s=n.required,c=n.value,u=n.type;!1===o&&r.push(e+" is invalid"),"email"!==u||(0,Nt.K0)(c,!1,"EMAIL")||(r.push((0,zl.W)(i(nd||(nd=qu()(["review_display.4.0.share_your_photo.manage.fields.error_invalid"]))),e)),m((function(t){var r=d()({},t);return r[e].isValid=!1,r}))),!0===s&&""===Jl()(c).call(c)&&(r.push((0,zl.W)(i(id||(id=qu()(["review_display.4.0.share_your_photo.manage.fields.error_required"]))),e)),m((function(t){var r=d()({},t);return r[e].isValid=!1,r}))),t[e]=c},a=0,l=g()(h);a").pop()).call(t)})).join(", "):null},Ed=function(e){function t(){for(var t,r,n,i=arguments.length,a=new Array(i),s=0;s=-1&&-1===this.state.modalStartingIndex&&this.elementToRecieveFocus.current&&(this.elementToRecieveFocus.current.focus(),this.elementToRecieveFocus.current=null),null==t.totalMedia&&"number"==typeof i)&&(null===(r=(n=this.props.config).on_render)||void 0===r||r.call(n,{component:Kc.ZP.IRLSnippet},{media_count:i}))},r.render=function(){var e,t,r,n=this,i=this.props,o=i.config,a=i.localizations,s=i.merchantProperties,l=i.elementConfig,c=(l=void 0===l?{}:l).category,u=l.hashtags,d=i.elementConfig,p=i.type,f=i.gridImageGroupSize,h=i.gridImageSize,m=this.state,v=m.media,g=m.totalMedia,_=m.pageSize,y=m.modalStartingIndex,w=m.mediaFirstModalOpen,b=m.isLoading,x=m.currentFlaggingIndex,E=m.flaggedContent,S=(0,Se.v)(s,o,d),C=S.REVIEW_MEDIA_MODAL_STYLE,j=S.SHOPPABLE_CAROUSEL_ENABLED,I=S.CD4_IRL_IMAGE_GALLERY_STYLE,k=S.SOCIAL_IRL_MEDIA_UPLOAD,N=S.IRL_ADD_PHOTO_BUTTON_POSITION;if("DARK"===C)return null;if(!Array.isArray(v))return null;if(0===v.length)return(0,_i.jsx)("div",{"data-testid":"irl-snippet"});y>=0&&(e="CARDV2"===C?(0,_i.jsx)(gc,{isFlagMediaOpen:null!=x,handleClose:this.closeModal,closeBtnText:(0,fo.ZP)("review_display.4.0.modal.close_button_text",a),role:"dialog","aria-labelledby":"mediaCarousel",children:null!=x?(0,_i.jsx)("div",{className:"pr-media-carousel",children:(0,_i.jsx)(rc,{localizations:a,onClose:function(){n.setState({modalStartingIndex:x,currentFlaggingIndex:null})},onSubmit:this.submitFlagReview})}):(0,_i.jsx)(Cc,{media:v,startingIndex:y,allowHelpfulVoting:!1,showShoppableLink:j,handleCarouselChange:this.onCarouselChange,handleFlagMedia:this.handleFlagMedia,flaggedContent:E,localizations:nc(a),UserImage:$s,UserVideo:Xs})}):(0,_i.jsx)(Bc,{localizations:a,merchantProperties:s,config:o,type:p,media:v,startingIndex:y,handleClose:this.closeModal,handleCarouselChange:this.onCarouselChange,allowHelpfulVoting:!1,allowReadReview:!1,showShoppableLink:j}));var R=w?(0,_i.jsx)(wd,{localizations:a,handleClose:this.closeMediaFirstModal,config:o}):null;t="GRID_LARGE"===I||"XL"===o.irlSubtype||"GRID"===I?(0,_i.jsx)(du,{imageGroupSize:f,imageSize:h,media:v,openModal:this.openModal,modal:e,localizations:a,totalMedia:g,onFetchMoreMedia:this.handleShowMore,galleryType:"XL"===o.irlSubtype?"GRID":I}):"DYNAMIC"===I?(0,_i.jsx)(Du,{media:v,localizations:a,totalMedia:g,onClick:this.openModal,modal:e,onShowMore:this.handleShowMore}):"SCROLL_LARGE"===I?(0,_i.jsx)(ou,{localizations:a,media:v,isLoading:b,pageSize:_,onClick:this.openModal,onShowMore:this.handleShowMore,modal:e}):(0,_i.jsx)(tu,{media:v,totalMedia:g,isLoading:b,pageSize:_,localizations:a,thumbnailSize:150,onClick:this.openModal,onShowMore:this.handleShowMore,modal:e}),(c||u)&&(r=(0,_i.jsx)(Zi.y5,{children:(0,_i.jsxs)(Zi.X6,{importance:1,className:"pr-irlsnippet-header",children:[c?xd(c):null," ",u?"#"+u.replace(","," #"):null]})}));var P=(0,_i.jsx)(bd,{onClick:this.openMediaFirstModal,label:(0,fo.ZP)("review_display.4.0.share_your_photo.cta.button_label",a)});return k?(0,_i.jsxs)("div",{className:"pr-irl-gallery","data-testid":"irl-snippet",children:[R,r,"top"===(null==N?void 0:N.toLowerCase())?(0,_i.jsxs)(_i.Fragment,{children:[P,t]}):(0,_i.jsxs)(_i.Fragment,{children:[t,P]})]}):(0,_i.jsxs)("div",{className:"pr-irl-gallery","data-testid":"irl-snippet",children:[r,t]})},en()(t,[{key:"shownative",get:function(){var e;return(0,Se.v)(this.props.config).IRL_SHOWNATIVE||!0===(null===(e=this.props.elementConfig)||void 0===e?void 0:e.shownative)}}]),t}(xe.Component);var Sd={key:ut,dataRequirements:pt,type:kt,component:function(e){var t=(0,xe.useContext)(Ui.E_),r=t.merchantProperties,n=t.localizations,i=(0,bi.dZ)(e.config.page_id,ul.MT),o=(0,Se.v)(r,e.config).CD4_IRL_IMAGE_GALLERY_STYLE,a=uu("XL"===e.config.irlSubtype?"GRID":o),s=a.gridImageSize,l=a.gridImageGroupSize;return(0,_i.jsx)(Ed,d()({merchantProperties:r,localizations:n,sendBeacon:i,gridImageSize:s,gridImageGroupSize:l},e))}},Cd=r(76808),jd="pr-qa-display-desktop",Id="pr-qa-display-tablet",kd={newest:{sortKey:"Newest",socialMeasurement:Cd.QA_DISPLAY_SORT_MOST_RECENT},oldest:{sortKey:"Oldest",socialMeasurement:Cd.QA_DISPLAY_SORT_OLDEST},mostAnswers:{sortKey:"MostAnswers",socialMeasurement:Cd.QA_DISPLAY_SORT_MOST_ANSWERS}},Nd=function(e,t){var r=(0,Nt.Eq)(new Date(e)),n="";if("number"==typeof r)if(r<=1)n+=" "+(0,fo.ZP)("qa_display.4.0.common.day_ago",t).replace("{0}",1);else if(r>1&&r<30)n+=1===r?" "+(0,fo.ZP)("qa_display.4.0.common.day_ago",t).replace("{0}",r):" "+(0,fo.ZP)("qa_display.4.0.common.days_ago",t).replace("{0}",r);else if(r>=30&&r<335){var i=Math.round(r/30);n+=1===i?" "+(0,fo.ZP)("qa_display.4.0.common.month_ago",t).replace("{0}",i):" "+(0,fo.ZP)("qa_display.4.0.common.months_ago",t).replace("{0}",i)}else if(r>=335){var o=Math.round(r/365);n+=1===o?" "+(0,fo.ZP)("qa_display.4.0.common.year_ago",t).replace("{0}",o):" "+(0,fo.ZP)("qa_display.4.0.common.years_ago",t).replace("{0}",o)}return n},Rd=["modalEnabled"],Pd=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){var e=this.props,t=e.modalEnabled,r=s()(e,Rd);return t?(0,_i.jsx)(Rs,d()({role:"dialog"},r)):this.props.children},t}(xe.Component),Td=Pd,Ad=r(77053),Ld=function(e){function t(t){var r;return(r=e.call(this,t)||this).calculateSubheader=r.calculateSubheader.bind(co()(r)),r}vi()(t,e);var r=t.prototype;return r.calculateSubheader=function(){var e;return this.props.nickname&&(e=this.props.localizations["qa_display.author.answered_by"].replace("{0}",this.props.nickname),this.props.location&&(e+=" "+this.props.localizations["nickname_and_location.from_label"]+" "+this.props.location)),(0,_i.jsx)("div",{className:"pr-question-subheader",children:(0,_i.jsx)("span",{children:e})})},r.render=function(){var e=this.calculateSubheader();return(0,_i.jsxs)("div",{className:"pr-qa-display-item",children:[(0,_i.jsx)("div",{className:"pr-qa-answer-bubble"}),(0,_i.jsxs)("div",{className:"pr-qa-display-text-content",children:[(0,_i.jsx)(Zi.X6,{importance:2,className:"pr-question-text",children:this.props.answerText}),e]})]})},t}(xe.Component),Od=Ld,Dd=function(e){function t(t){var r;return(r=e.call(this,t)||this).calculateSubheader=r.calculateSubheader.bind(co()(r)),r}vi()(t,e);var r=t.prototype;return r.calculateSubheader=function(){if(this.props.nickname){var e=this.props.localizations["qa_display.author.asked_by"].replace("{0}",this.props.nickname);if("number"==typeof this.props.daysAgo)if(this.props.daysAgo>1&&this.props.daysAgo<30)e+=" "+this.props.localizations["qa_display.relative_time.days_ago"].replace("{0}",this.props.daysAgo);else if(this.props.daysAgo>=30&&this.props.daysAgo<335){var t=this.props.daysAgo/30;e+=" "+this.props.localizations["qa_display.relative_time.months_ago"].replace("{0}",Math.round(t))}else if(this.props.daysAgo>=335){var r=this.props.daysAgo/365;e+=" "+this.props.localizations["qa_display.relative_time.years_ago"].replace("{0}",Math.round(r))}return(0,_i.jsx)("div",{className:"pr-question-subheader",children:(0,_i.jsx)("span",{children:e})})}},r.render=function(){var e,t,r=this.calculateSubheader();return this.props.answer&&(t=(0,_i.jsx)("div",{className:"pr-qa-connecting-line"}),e=(0,_i.jsx)(Od,{localizations:this.props.localizations,answerText:this.props.answer.answer_text,nickname:this.props.answer.author_name,daysAgo:this.props.daysAgo,location:this.props.answer.author_location})),(0,_i.jsxs)("div",{className:"pr-header",children:[(0,_i.jsxs)("div",{className:"pr-qa-display-item",children:[(0,_i.jsx)("div",{className:"pr-qa-question-bubble",children:(0,_i.jsx)("div",{children:this.props.localizations["qa_display.question_first_letter"]})}),(0,_i.jsxs)("div",{className:"pr-qa-display-text-content",children:[(0,_i.jsx)(Zi.X6,{importance:2,className:"pr-question-text",children:this.props.questionText}),r]}),t]}),(0,_i.jsx)(Zi.y5,{children:e})]})},t}(xe.Component),Md=Dd,Fd=r(51370),zd=r(74456),Vd=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){var e,t,r,n;this.props.product&&(e=Nt.Cu(this.props.product),t=this.props.product.name),this.props.question&&this.props.question.question_text&&(r=(0,_i.jsx)(Md,{questionText:this.props.question.question_text,nickname:this.props.question.author_name,daysAgo:this.props.daysAgo,localizations:this.props.localizations.product_answers}));var i=!!(0,Se.$)("enable_enhanced_content_security",this.props.merchant.configuration,this.props.config,!0);return n=this.props.product.full_product_url&&!1===i?(0,_i.jsx)("a",{className:"pr-underline",href:this.props.product.full_product_url,children:t}):(0,_i.jsx)("p",{className:"pr-waqwaa-product-name",children:t}),(0,_i.jsxs)("div",{children:[(0,_i.jsxs)("div",{className:"pr-header",children:[(0,_i.jsx)(Fd.Z,{message:"This is a TEST Q/A",type:"warning",isVisible:this.props.isTest}),(0,_i.jsxs)("div",{className:"pr-header-table",children:[(0,_i.jsx)("div",{className:"table-cell pr-header-product-img",children:(0,_i.jsx)(zd.q,{src:e,alt:(0,fo.ZP)("cd.common.media.product_image",this.props.localizations),errorAlt:(0,fo.ZP)("cd.common.media.product_image.unavailable",this.props.localizations)})}),(0,_i.jsxs)("div",{className:"table-cell",children:[(0,_i.jsx)(Zi.X6,{importance:1,className:"pr-header-title",id:"pr-waqwaa-header",children:r?(0,fo.ZP)("answer_wizard.edit.page_headline_general",this.props.localizations.product_answers):(0,fo.ZP)("question_wizard.edit.page_headline_general",this.props.localizations.product_answers)}),n]})]})]}),(0,_i.jsx)(Zi.y5,{children:r})]})},t}(Ad.Z),qd=Vd,Wd=r(28501),Ud=r(11857),Zd=r(3342),Bd=r(95147),Hd=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a0?r.props.choices[0].value:"product",questionType:null,category:null}),po()(co()(r),"handleTypeChange",(function(e){r.setState({questionType:e[0].id},r.updateStore)})),po()(co()(r),"handleCategoryChange",(function(e){r.setState({category:e[0].id},r.updateStore)})),po()(co()(r),"updateStore",(function(){var e={type:r.state.questionType,category:r.state.category},t={type:r.state.questionType,category:r.calculateCategoryChoices()};r.updateCollection(r.props.fieldIndex,e,t)})),po()(co()(r),"calculateTypeChoices",(function(){var e;return y()(e=r.props.choices).call(e,(function(e){return{value:e.label,id:e.value,checked:e.value===r.state.questionType}}))})),po()(co()(r),"calculateCategoryChoices",(function(){var e,t,n=r.state.questionType||r.state.defaultQuestionType;if(r.props.choices.length<1)return[];var i=m()(e=r.props.choices).call(e,(function(e){return e.value===n}));return y()(t=i[0].choices).call(t,(function(e){return{id:e.value,value:e.label,checked:e.value===r.state.category}}))})),r}return vi()(t,e),t.prototype.render=function(){var e,t=this.props.choices.length<=1;return e=!t&&this.state.questionType&&this.props.showCategories?[(0,_i.jsx)(Hd,{id:"questionType",fieldIndex:"questionType",inputType:"RadioHorizontal",label:this.props.typeLabel,choices:this.calculateTypeChoices(),handleChange:this.handleTypeChange,isValid:this.props.isValid,isVisible:!0,isRequired:this.props.isRequired,requiredText:this.props.requiredText,requiredErrorText:this.props.requiredErrorText},"etgb-1"),(0,_i.jsx)(Hd,{id:"questionCategory",fieldIndex:"questionCategory",inputType:"RadioVertical",label:this.props.categoryLabel,choices:this.calculateCategoryChoices(),handleChange:this.handleCategoryChange,isValid:this.props.isValid,isVisible:!0,requiredText:this.props.requiredText,requiredErrorText:this.props.requiredErrorText},"etgb-2")]:t&&this.props.showCategories?[(0,_i.jsx)(Hd,{id:"questionCategory",fieldIndex:"questionCategory",inputType:"RadioVertical",label:this.props.categoryLabel,choices:this.calculateCategoryChoices(),handleChange:this.handleCategoryChange,isValid:this.props.isValid,isVisible:!0,requiredText:this.props.requiredText,requiredErrorText:this.props.requiredErrorText},"etgb-1")]:[(0,_i.jsx)(Hd,{id:"questionType",fieldIndex:"questionType",inputType:"RadioHorizontal",label:this.props.typeLabel,choices:this.calculateTypeChoices(),handleChange:this.handleTypeChange,isValid:this.props.isValid,isVisible:!0,isRequired:this.props.isRequired,requiredText:this.props.requiredText,requiredErrorText:this.props.requiredErrorText,helperText:this.props.categoryLabel},"etgb-1")],(0,_i.jsx)("div",{children:e})},t}(Zd.Z),Gd=Kd,Qd=r(52762),Yd=r(38275),$d=r(9328),Xd=function(e){for(var t=Yo.ZP.parse(e.product_answers["question_wizard.edit.type_of_question_options_json"]),r={},n=0;n0?null:{category:null,type:"product"},typeLabel:n.product_answers["question_wizard.edit.type_of_question"],categoryLabel:n.product_answers["question_wizard.edit.choose_one"],choices:i},{id:"question_text",key:"questionText",input_type:"TextArea",label:n.product_answers["question_wizard.edit.question_label"],helper_text:n.product_answers["question_wizard.edit.question_example"],isValid:!0,required:!0},{id:"author_email",key:"authorEmail",input_type:"TextBox",label:n.product_answers["question_wizard.edit.email_label"],helper_text:n.product_answers["question_wizard.edit.email_example"],example:(0,fo.ZP)("please_provide_email",n.product_answers),value:t.merchant_user_email||null,isValid:!0,validationType:$d.Z.EMAIL,required:r.configuration.answerbox_required_email},{id:"author_name",key:"authorName",input_type:"TextBox",label:n.product_answers["question_wizard.edit.nickname_label"],helper_text:n.product_answers["question_wizard.edit.nickname_example"],isValid:!0,required:r.configuration.answerbox_nickname_is_required},{id:"author_location",key:"authorLocation",input_type:"TextBox",label:n.product_answers["question_wizard.edit.location_label"],helper_text:n.product_answers["question_wizard.edit.location_example"],isValid:!0,required:!1}]},ep=function(e){var t=e.localizations,r=(t=void 0===t?{}:t).product_answers,n=void 0===r?{}:r;return[{id:"answer_text",key:"answerText",input_type:"TextArea",label:n["answer_wizard.edit.answer_label"],helper_text:n["answer_wizard.edit.answer_example"],isValid:!0,required:!0},{id:"author_name",key:"authorName",input_type:"TextBox",label:n["answer_wizard.edit.nickname_label"],helper_text:n["answer_wizard.edit.nickname_example"],isValid:!0},{id:"author_location",key:"authorLocation",input_type:"TextBox",label:n["answer_wizard.edit.location_label"],helper_text:n["answer_wizard.edit.location_example"],isValid:!0}]},tp=r(25857),rp=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a-1&&(t.isValid=!1),t}))),e.error_code===yn.Z.INVALID_VALUE&&(n=y()(n).call(n,(function(t){return"author_email"===t.id&&e.fields&&e.fields[0]&&"author_email"===e.fields[0][0]&&(t.isValid=!1,t.labelChanged=!0,t.originalLabel=t.label,t.label=r.props.localizations.product_answers.notValidEmail,t.exampleChanged=!0,t.originalExample=t.example,t.example=void 0),t}))),e.error_code===yn.Z.RESTRICTED_WORD){var t=g()(e.fields[0]);n=y()(n).call(n,(function(r){if(I()(t).call(t,r.id)>-1){var n=e.fields[0][r.id][0];r.isValid=!1,r.error_message={detail:{invalid:e.message.replace(/\.$/,":")+" "+n}}}return r}))}})),r.setState({fields:n},(function(){return setTimeout((function(){var e=document.getElementsByClassName("pr-invalid-field")[0];e&&(e.focus(),r._handleScrollErrorIntoView(e))}),0)}))})),po()(co()(r),"handleFieldUpdate",(function(e,t){var n,i=e.value,a=gn()(e),s=e.isValid,l=o()(n=[]).call(n,r.state.fields);l[t]=d()(d()({},l[t]),{},{value:i,values:a,isValid:s}),r.setState({fields:l})})),po()(co()(r),"getRequiredErrorText",(function(e){var t=r.props.localizations;return(0,Jo.WU)((0,fo.ZP)("qa_display.4.0.error_alert.required_field",t.product_answers),e.typeLabel||e.label.replace(":",""))})),r}vi()(t,e);var r=t.prototype;return r.componentDidUpdate=function(e){!e.errors&&this.props.errors&&this.handleSubmissionError(this.props.errors)},r.render=function(){var e,t,r,n=this,i=this.props,o=i.merchant,a=i.localizations,s=this.state.fields,l=!0;if(o&&o.configuration.answerbox_enable_pre_question&&gn()(s[0])&&"service"===gn()(s[0]).type){l=!1;var c=a.product_answers["question_wizard.pre.instruction_html"].replace(/\$\{baseUrl\}/g,"");t=(0,_i.jsx)("div",{className:"pr-form-group form-group pr-waq-prequestion-message",children:(0,_i.jsx)("p",{className:"pr-prequestion-size",dangerouslySetInnerHTML:{__html:c}})})}else r=(0,_i.jsxs)("div",{children:[y()(s).call(s,(function(e,t){return t>0?(0,_i.jsx)(Wd.Z,{field:e,fieldIndex:t,handleFieldUpdate:n.handleFieldUpdate,localizations:a,prependID:!1,requiredText:a.product_answers["question_wizard.edit.required_label"],requiredErrorText:n.getRequiredErrorText(e)},e.id):null})),(0,_i.jsx)("p",{className:"pr-form-group form-group pr-waq-legal-text",children:(0,_i.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,fo.ZP)("question_wizard.legal",a.product_answers)||""}})}),(0,_i.jsx)(Yd.Z,{onClick:this.onSubmit,localizations:a,children:(0,fo.ZP)("question_wizard.preview.submit_button_label",a.product_answers)})]});var u=(0,fo.ZP)("question_wizard.edit.required_label",a.product_answers),d=m()(e=this.state.fields).call(e,(function(e){return!1===e.isValid})),p=d.length>0,f=function(){if(0===d.length)return null;var e=1===d.length?"qa_display.4.0.error_alert.heading_singular":"qa_display.4.0.error_alert.heading_plural",t=(0,Jo.WU)((0,fo.ZP)(e),d.length);return(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:2,className:"pr-alert_heading",children:t})}),(0,_i.jsx)("ul",{className:"pr-alert_list",children:y()(d).call(d,(function(e){return(0,_i.jsx)("li",{children:n.getRequiredErrorText(e)},e.id)}))})]})}();return(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)("div",{className:"pr-alert-message",tabIndex:"-1",ref:this.errorAlert,children:(0,_i.jsx)(Fd.Z,{message:f,type:"danger",isVisible:p})}),(0,_i.jsxs)("form",{className:"pr-question-form",onSubmit:function(e){e.preventDefault()},"data-testid":"question-form",children:[(0,_i.jsxs)("p",{className:"pr-header-required",tabIndex:"0",children:[(0,_i.jsx)("abbr",{className:"pr-required-indicator",title:u,children:"*"}),(0,_i.jsx)("span",{className:"pr-required-text",children:(0,fo.ZP)("qa_display.required_indicator",a.product_answers)})]}),(0,_i.jsx)(Gd,{showCategories:l,id:"questionTypeCategory",fieldIndex:0,typeLabel:a.product_answers["question_wizard.edit.type_of_question"],categoryLabel:a.product_answers["question_wizard.edit.choose_one"],choices:Xd(a),isRequired:!0,requiredText:u,requiredErrorText:this.getRequiredErrorText(s[0]),isValid:s[0].isValid,localizations:a,handleFieldUpdate:this.handleFieldUpdate}),t,r]})]})},t}(xe.Component),np=(0,tp.r)(rp),ip=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a-1&&(t.isValid=!1),t}))),e.error_code===yn.Z.RESTRICTED_WORD){var t=g()(e.fields[0]);n=y()(n).call(n,(function(r){if(I()(t).call(t,r.id)>-1){var n=e.fields[0][r.id][0];r.isValid=!1,r.error_message={detail:{invalid:e.message.replace(/\.$/,":")+" "+n}}}return r}))}})),r.setState({fields:n},(function(){return setTimeout((function(){var e=document.getElementsByClassName("pr-invalid-field")[0];e&&(e.focus(),r._handleScrollErrorIntoView(e))}),0)}))})),po()(co()(r),"handleFieldUpdate",(function(e,t){var n,i=e.value,a=gn()(e),s=e.isValid,l=o()(n=[]).call(n,r.state.fields);l[t]=d()(d()({},l[t]),{},{value:i,values:a,isValid:s}),r.setState({fields:l})})),r}vi()(t,e);var r=t.prototype;return r.componentDidUpdate=function(e){!e.errors&&this.props.errors&&this.handleSubmissionError(this.props.errors)},r.renderWYBForm=function(){var e,t=this,r=this.props.localizations,n=this.state.fields;return(0,_i.jsxs)("form",{className:"pr-answer-form",onSubmit:function(e){e.preventDefault()},children:[y()(e=Ni()(n).call(n,0,1)).call(e,(function(e,n){var i=d()(d()({},e),{},{label:r.label,helper_text:r.why_did_you_buy.question_placeholder,rows:2,maxCharacters:130});return(0,_i.jsx)(Wd.Z,{field:i,fieldIndex:n,handleFieldUpdate:t.handleFieldUpdate,localizations:r,prependID:!1,requiredText:(0,fo.ZP)("required_label",r.why_did_you_buy)},i.id)})),(0,_i.jsx)(Yd.Z,{onClick:this.onSubmit,showLogo:!0,showLegal:!0,logoText:r.why_did_you_buy.powerred_by,legalText:r.why_did_you_buy.legal_text,localizations:r,children:(0,fo.ZP)("submit_button",r.why_did_you_buy)})]})},r.renderWAAForm=function(){var e=this,t=this.props.localizations,r=this.state.fields,n=(0,fo.ZP)("answer_wizard.edit.required_label",t.product_answers);return(0,_i.jsxs)("form",{className:"pr-answer-form",onSubmit:function(e){e.preventDefault()},"data-testid":"answer-form",children:[(0,_i.jsxs)("p",{className:"pr-header-required",tabIndex:"0",children:[(0,_i.jsx)("abbr",{className:"pr-required-indicator",title:n,children:"*"}),(0,_i.jsx)("span",{className:"pr-required-text",children:(0,fo.ZP)("qa_display.required_indicator",t.product_answers)})]}),y()(r).call(r,(function(r,i){return(0,_i.jsx)(Wd.Z,{field:r,fieldIndex:i,handleFieldUpdate:e.handleFieldUpdate,localizations:t,prependID:!1,requiredText:n},r.id)})),(0,_i.jsx)(Yd.Z,{onClick:this.onSubmit,localizations:t,children:(0,fo.ZP)("answer_wizard.preview.submit_button_label",t.product_answers)})]})},r.render=function(){return this.props.type===ul.ZP.WYB?this.renderWYBForm():this.renderWAAForm()},t}(xe.Component),op=(0,tp.r)(ip),ap=function(e){function t(t){var r;return(r=e.call(this,t)||this).state={type:r.props.config.question_id?"answer":"question"},r}vi()(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this;if(this.props.config.on_submit){var t,r=[];if("WAQ"===this.props.type){var n;t=Kc.ZP.WriteAQuestion;var i=["author_email","author_location","author_name","merch","merchant_question_category","question_text","question_type"];r=m()(n=y()(i).call(i,(function(t){return{key:t,value:e.props.question[t]}}))).call(n,(function(e){return e.value}))}else if("WAA"===this.props.type){var o;t=Kc.ZP.WriteAnAnswer;var a=["answer_text","author_location","author_name"];r=m()(o=y()(a).call(a,(function(t){return{key:t,value:e.props.answer[t]}}))).call(o,(function(e){return e.value}))}Gc.Z.onWriteComponentSubmit(t,this.props,{fields:r})}},r.render=function(){var e,t,r=this,n=function(){var e,t="";(0,Se.$)("pr_return_url",r.props.config)&&((e=(0,Se.$)("pr_return_url",r.props.config,!0)?Nt.nS((0,Se.$)("pr_return_url",r.props.config,!0)):Nt.nS((0,Se.$)("pr_return_url",r.props.config,!1)))&&(t=e.match(/^http/g)?e:"http:"+e));return t};return(0,Se.$)("enable_enhanced_content_security",this.props.config,!0)||(t=n()?n():this.props.product.full_product_url?this.props.product.full_product_url:window.location.origin?window.location.origin+"/":window.location.protocol+"/"+window.location.host),this.props.question&&(e=(0,_i.jsx)(Md,{localizations:this.props.localizations,questionText:this.props.question.question_text,nickname:this.props.question.author_name,daysAgo:this.props.question.days_since_asked,answer:this.props.answer})),(0,_i.jsxs)("div",{children:[(0,_i.jsx)("div",{className:"pr-header",children:(0,_i.jsx)("div",{className:"pr-header-table",children:(0,_i.jsxs)("div",{className:"table-cell",children:[(0,_i.jsx)(Zi.X6,{importance:1,className:"pr-header-title",children:(0,fo.ZP)(this.state.type+"_wizard.confirmation.page_headline",this.props.localizations)}),(0,_i.jsx)("span",{children:(0,fo.ZP)(this.state.type+"_wizard.confirmation.under_headline_text",this.props.localizations)})]})})}),e,t&&(0,_i.jsx)("p",{children:(0,_i.jsx)("a",{href:t,children:(0,fo.ZP)(this.state.type+"_wizard.confirmation.merchant_base_link_label",this.props.localizations)+" >>"})})]})},t}(xe.Component),sp=ap,lp=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){var e="WAQ"===this.props.type?"question":"answer";return(0,_i.jsxs)("div",{className:"pr-waqwaa-error-message",children:[(0,_i.jsxs)(Zi.X6,{importance:1,children:["We're sorry this ",e," form is not curently availble"]}),(0,_i.jsxs)("p",{children:["We apologize for this inconvenience. Please bookmark this page and try adding your ",e," at another time."]})]})},t}(xe.Component),cp=lp,up=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a0&&(0,_i.jsx)("a",{className:"pr-qa-display-clear-search-button",href:"",role:"button",onClick:this.handleClearQueryResults,children:(0,fo.ZP)("qa_display.4.0.search.clear_search",r)}),(0,_i.jsx)("div",{role:"status",children:a.length>0&&0===n.length?(0,_i.jsxs)("div",{className:"pr-qa-display-search-no-results",children:[(0,_i.jsx)(Zi.X6,{importance:2,shouldUseSpan:o,children:(0,fo.ZP)("qa_display.4.0.search.no_results.header",r)}),(0,_i.jsx)("p",{children:(0,fo.ZP)("qa_display.4.0.search.no_results.ask_question_text",r)}),(0,_i.jsx)("p",{children:(0,fo.ZP)("qa_display.4.0.search.no_results.ask_question_delay_text",r)})]}):null}),(0,_i.jsxs)("div",{role:"status","aria-atomic":"true",className:"pr-accessible-text",children:[a.length>0&&1===n.length?(0,Jo.WU)((0,fo.ZP)("qa_display.4.0.button.search.results",r),a[0].value,i):a.length>0&&n.length>1?(0,Jo.WU)((0,fo.ZP)("qa_display.4.0.button.search.results_plural",r),a[0].value,i):null,u?(0,Jo.WU)((0,fo.ZP)("qa_display.4.0.sorting.questions_showing_amount",r),n.length,i):null]})]})},t}(xe.Component),yp=_p,wp=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a|<\/em>)/g),n=[],i=0;i"===r[i]&&""===r[i+2]?(n.push((0,_i.jsx)("em",{children:Ll(r[i+1],t)},i)),i+=2):n.push.apply(n,Ll(r[i],t));return n})),po()(co()(r),"answerTextContainerId",(0,Jo.x0)()),po()(co()(r),"helpfulVotingLabelId",(0,Jo.x0)()),r}return vi()(t,e),t.prototype.render=function(){var e=this,t=this.props,r=t.microdata,n=t.answer,i=t.localizations,o=t.helpfulVotes,a=t.unhelpfulVotes,s=function(e,t){var r,n,i,o="pr-answer-by",a="pr-qa-display-answer-by-container pr-qa-display-answer-by-container-";return e.details.brand_base_url&&e.details.brand_name?(r="Brand",o+="-brand",a+="brand",i=(0,fo.ZP)("qa_display.4.0.badging.author_type_text.verified_reply",t),e.details.brand_image_url&&(n=e.details.brand_image_url)):"EXPERT"===e.details.author_type?(r="Expert",n="qa_verified_reply",o+="-expert",a+="expert",i=(0,fo.ZP)("qa_display.4.0.badging.author_type_text.verified_reply",t)):"APO"===e.details.author_type?(r="Ask Product Owner",n="verified_buyer",o+="-verified",a+="verified",i=(0,fo.ZP)("qa_display.4.0.badging.author_type_text.product_owner",t)):(r="Community",n="community",a+="unverified",i=(0,fo.ZP)("qa_display.4.0.badging.author_type_text.community",t)),{type:r,iconType:n,className:o,containerClass:a,authorTypeLocalization:i}}(n,i),l=s.type,c=s.iconType,u=s.className,p=s.containerClass,f=s.authorTypeLocalization,h=n.ugc_id,m=function(e){return function(t){return(0,Jo.WU)((0,Jo.Ip)(e,i),t)}},v=n.media?Gt(n.media):null;return(0,_i.jsx)("div",d()(d()({},this.props.microdata.root),{},{className:p,children:(0,_i.jsxs)("div",{className:"pr-qa-display-answer-details",children:[c&&(0,_i.jsx)("span",{"aria-hidden":"true",className:"pr-qa-display-answer-icon",children:(0,_i.jsx)(yl,{badgeType:c})}),"Brand"===l?(0,_i.jsxs)("span",{className:u+" pr-qa-display-answer-by",children:[n.details.brand_image_url&&(0,_i.jsx)("img",{src:"//images.powerreviews.com"+n.details.brand_image_url,alt:n.details.brand_name,width:"25",className:u+"-logo"}),(0,_i.jsx)("div",{className:u+"-text",children:(0,Jo.Ip)("qa_display.4.0.common.brand_answer_highlight",i).replace("{0}",n.details.brand_name)})]}):(0,_i.jsxs)("span",d()(d()({},r.author),{},{className:u+" pr-qa-display-answer-by pr-subscript",children:[(0,_i.jsx)("span",{children:f}),!!n.details.nickname&&(0,_i.jsxs)("span",{children:[(0,_i.jsx)("span",{children:" - "}),(0,_i.jsx)("span",d()(d()({},r.name),{},{children:n.details.nickname}))]})]})),(0,_i.jsx)("span",d()(d()({},r.text),{},{className:"pr-qa-display-answer-text",id:this.answerTextContainerId,children:this.renderAnswerText(n)})),(0,_i.jsx)(Ep,{media:v}),(0,_i.jsx)("span",{className:"pr-accessible-text sr-only",id:this.helpfulVotingLabelId,children:(0,Jo.Ip)("qa_display.4.0.helpful.helpful_question",i)}),function(){if(!n.metrics)return null;var t=Bs(o,n.metrics.helpful_votes,h,m("qa_display.4.0.helpful.helpful_vote_label")),r=Bs(a,n.metrics.not_helpful_votes,h,m("qa_display.4.0.helpful.unhelpful_vote_label"));return(0,_i.jsxs)(Hs,{voted:t.voted||r.voted,votedLabel:(0,Jo.Ip)("qa_display.4.0.helpful.already_voted",i),votedMessage:(0,Jo.Ip)("qa_display.4.0.helpful.thank_you",i),"aria-labelledby":e.helpfulVotingLabelId,"aria-describedby":e.answerTextContainerId,children:[(0,_i.jsx)(Ks,{type:Ot,voted:t.voted,count:t.count,"aria-label":t.label,onClick:e.handleVoteSubmit}),(0,_i.jsx)(Ks,{type:Dt,voted:r.voted,count:r.count,"aria-label":r.label,onClick:e.handleVoteSubmit})]})}()]})}))},t}(xe.Component);po()(Ip,"contextType",bi.re);var kp={voteAnswer:function(e,t,r,n){return void 0===n&&(n=Wr),function(i){return vr.mD(d()(d()({},t),{},{vote_type:r.toLowerCase(),command:n===qr?"voteugc":"voteanswer",ugc_id:e})),i({type:Hr,votedID:e,voteType:r})}}},Np=(0,gi.$j)((function(e){return{helpfulVotes:e.Questions.helpfulVotes,unhelpfulVotes:e.Questions.unhelpfulVotes}}),kp)(Ip),Rp=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a1&&(h=(0,fo.ZP)("qa_display.4.0.button.show_more_answers_plural",i)),h=h.replace("{0}",n.answer.length-1),(0,_i.jsxs)(xe.Fragment,{children:[!l&&(0,_i.jsx)("dd",{className:"pr-qa-display-answer-link-container",children:(0,_i.jsxs)("button",{type:"button",id:n.question_id+"-link","aria-expanded":c,"aria-controls":n.question_id+"-content-container",className:c?"pr-btn-answer pr-answer-form-open":"pr-btn-answer",onClick:this.handleShowAnswerForm,children:[(0,_i.jsx)(Is,{}),(0,_i.jsx)("span",{className:"pr-qa-display-text",children:c?(0,fo.ZP)("qa_display.4.0.button.cancel",i):(0,fo.ZP)("qa_display.4.0.button.add_answer",i)})]})}),(0,_i.jsx)("div",{id:n.question_id+"-content-container",children:!l&&c&&(0,_i.jsx)("dd",{id:n.question_id+"-content","aria-labelledby":n.question_id+"-link",role:"region",className:"pr-qa-display-add-answer",children:(0,_i.jsx)("div",{className:"pr-qa-display-form",children:(0,_i.jsx)(pp,{config:d()(d()({},r),{},{question_id:n.question_id}),type:"WAA",onAnswerSubmit:this.handleAnswerSubmit})})})}),y()(f).call(f,(function(e){return(0,_i.jsxs)("dd",{className:"pr-qa-display-answer",children:[(0,_i.jsx)("span",{tabIndex:"-1","aria-hidden":"true",style:{outline:"none"}}),(0,_i.jsx)(Np,{microdata:a.answer,answer:e,config:r,localizations:i})]},e.answer_id)})),!u&&n.answer.length>1&&(0,_i.jsx)("dd",{className:"pr-qa-display-show-more-answers",children:(0,_i.jsxs)("button",{className:"pr-btn-show-more pr-qa-display-link",type:"button","aria-label":h,onClick:this.handleShowMoreAnswers,children:[(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"4"}),(0,_i.jsx)("span",{className:"pr-qa-display-text",children:h})]})})]})},t}(xe.Component);po()(Rp,"contextType",bi.re);var Pp=Rp,Tp=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){var e=this.props,t=e.config,r=e.merchantProperties,n=e.localizations,i=e.question,o=(0,Bt.x9)(t,r),a=o.showJSONLD,s=o.showMicrodata,l={empty:{root:{},text:{},dateCreated:{},answerCount:{},answer:{root:{},text:{},author:{},name:{}}},root:{itemScope:!0,itemType:"http://schema.org/Question"},text:{itemProp:"text"},dateCreated:{itemProp:"dateCreated"},answerCount:{itemProp:"answerCount",content:i.answer_count},answer:{root:{itemScope:!0,itemType:"http://schema.org/Answer",itemProp:"suggestedAnswer"},text:{itemProp:"text"},author:{itemScope:!0,itemType:"http://schema.org/Person",itemProp:"author"},name:{itemProp:"name"}}};l=s?l:l.empty;var c=(0,fo.ZP)("qa_display.4.0.q_icon.label",n),u=i.details.is_seeded?(0,fo.ZP)("qa_display.4.0.description.added_by",n)+" "+i.details.brand_name+" "+(0,fo.ZP)("qa_display.4.0.description.common_question",n):(0,fo.ZP)("qa_display.4.0.description.asked_by",n)+" "+i.details.nickname;return(0,_i.jsx)(Zi.y5,{children:(0,_i.jsxs)("div",d()(d()({},l.root),{},{className:"pr-qa-display-questionlist",children:[(0,_i.jsxs)("dt",{alt:"question",className:"pr-qa-display-item",children:[(0,_i.jsx)("span",{tabIndex:"-1",className:"pr-accessible-focus-element qa-display-focus-target","aria-hidden":"true",style:{outline:"none"}}),(0,_i.jsx)("abbr",{className:"pr-qa-display-item-icon",title:c,"aria-label":c,children:(0,fo.ZP)("qa_display.4.0.q_icon.icon",n)}),(0,_i.jsx)(Zi.X6,d()(d()({},l.text),{},{importance:2,shouldUseSpan:(0,Se.$)("DISABLE_CD4_HEADING_STRUCTURES",r,t),className:"pr-qa-display-item-text",dangerouslySetInnerHTML:{__html:i.highlights?i.highlights.details.text:i.details.text}})),(0,_i.jsx)("meta",d()({},l.answerCount))]}),(0,_i.jsxs)("dt",{className:"pr-qa-display-item-details",children:[(0,_i.jsx)("sub",{className:"pr-subscript",children:u}),!i.details.is_seeded&&(0,_i.jsx)("time",d()(d()({},l.dateCreated),{},{dateTime:new Date(i.details.created_date).toISOString(),children:Nd(i.details.created_date,n)}))]}),(0,_i.jsx)(Pp,{question:i,config:t,localizations:n,microdata:l}),a&&(0,_i.jsx)("dd",{"aria-hidden":"true",children:(0,_i.jsx)(xp,{question:i,config:t,merchantProperties:r})})]}))})},t}(xe.Component),Ap=Tp,Lp=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a=980?jd:t<980&&t>780?Id:null;return(0,_i.jsx)(Lp,d()({containerClass:r},e))}po()(Lp,"contextType",bi.re);var Dp=function(e){function t(){return e.apply(this,arguments)||this}vi()(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this.props,t=e.isLoading,r=e.config,n=e.getQuestions;"boolean"!=typeof t&&n(r)},r.componentDidUpdate=function(e){this.props.config.on_render&&null==e.totalQuestions&&"number"==typeof this.props.totalQuestions&&Gc.Z.onQuestionsComponentRender(Kc.ZP.QuestionDisplay,this.props,{total:this.props.totalQuestions})},r.render=function(){return(0,_i.jsx)(Op,d()({},this.props),this.props.redrawKey)},t}(xe.Component),Mp={getQuestions:Gr,getMoreQuestions:function(e,t){var r=(0,Nt.iC)(e);return function(n){return mr(t,d()(d()({},e),{},{noConfig:!0})).then((function(e){return n({type:Br,productKey:r,response:e})}))}},questionSubmitted:Qr},Fp=(0,gi.$j)((function(e,t){var r=(0,Nt.iC)(t.config),n=e.Questions[r]||{};return d()(d()({},n),{},{redrawKey:e.Redraw.redrawKey})}),Mp)((function(e){var t=(0,xe.useContext)(Ui.E_),r=t.merchantProperties,n=t.localizations,i=t.features;return(0,_i.jsx)(Dp,d()(d()({},e),{},{merchantProperties:r,localizations:n,features:i}))})),zp={key:Ye,dataRequirements:pt,type:xt,component:Fp},Vp=[{name:"pr-snippet-minimal",width:1},{name:"pr-snippet-compact",width:410},{name:"pr-snippet-standard",width:650}],qp=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a1))return(0,_i.jsxs)("div",{className:"pr-snippet-qa pr-snippet-qa-empty","data-testid":"qa-snippet",children:[(0,_i.jsx)("p",{className:"pr-ask-question-cta pr-qa-large",children:(0,fo.ZP)("qa_display.4.0.want_to_know",a)}),(0,_i.jsx)("a",{className:"pr-ask-question-link",rel:"nofollow",href:(0,Bt.Em)(n,i)+"&appName=askQuestion",onClick:this.onAskQuestionClick,children:(0,fo.ZP)("qa_display.4.0.button.ask_question",a)}),(0,_i.jsx)("p",{className:"pr-ask-question-subtext",children:(0,fo.ZP)("qa_display.4.0.ask_question_delay_text",a)}),s]});t=(0,fo.ZP)("qa_display.4.0.snippet.answered_question_count_plural",a)}var l=t.replace("{0}",o),c=Jl()(e=t.replace("{0}","")).call(e);return(0,_i.jsx)(Qi.iX,{sizes:Vp,children:(0,_i.jsxs)("section",{className:"pr-snippet-qa","data-testid":"qa-snippet",children:[(0,_i.jsxs)("div",{className:"pr-snippet-qa-metrics",children:[(0,_i.jsx)("abbr",{className:"pr-qa-large",title:(0,fo.ZP)("qa_display.4.0.common.text",a),children:(0,fo.ZP)("qa_display.4.0.common.headline",a)}),(0,_i.jsx)("div",{"aria-hidden":"true",className:"pr-answered-question-circle",children:o}),(0,_i.jsx)("a",{className:"pr-snippet-qa-answer-link","aria-label":l,href:"#",onClick:this.onViewAnswersClick,children:c})]}),(0,_i.jsx)("a",{className:"pr-ask-question-link",rel:"nofollow",href:(0,Bt.Em)(n,i)+"&appName=askQuestion",onClick:this.onAskQuestionClick,children:(0,fo.ZP)("qa_display.4.0.button.ask_question",a)}),s]})})},t}(xe.Component),Wp=qp,Up=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a=0&&(Q="CARDV2"===F?(0,_i.jsx)(gc,{handleClose:$,closeBtnText:(0,fo.ZP)("review_display.4.0.modal.close_button_text",k),role:"dialog","aria-labelledby":"mediaCarousel",isFlagMediaOpen:f>=0,children:f>=0?(0,_i.jsx)("div",{className:"pr-media-carousel",children:(0,_i.jsx)(rc,{localizations:k,onClose:function(){u(f),h(-1)},onSubmit:function(e){return(0,vr.Os)(d()(d()(d()({},e),t),{},{merchant_id:t.merchant_id,command:"flagugc",ugc_id:a[f].id})).then((function(){_(o()(g).call(g,Number(a[f].id))),u(f),h(-1)}))}})}):(0,_i.jsx)(Cc,{media:a,startingIndex:c,allowHelpfulVoting:!0,showShoppableLink:!1,handleFlagMedia:function(e){h(e)},handleHelpfulVoting:function(e,r){return(0,vr.Os)(d()(d()({},t),{},{vote_type:r.toLowerCase(),command:"voteugc",ugc_id:e})).then((function(){"helpful"===r.toLowerCase()?b(o()(w).call(w,Number(e))):"unhelpful"===r.toLowerCase()&&S(o()(E).call(E,Number(e)))}))},flaggedContent:g,helpfulContent:w,unhelpfulContent:E,localizations:nc(k),UserImage:$s,UserVideo:Xs})}):(0,_i.jsx)(Bc,{localizations:k,merchantProperties:N,config:t,type:r,media:a,startingIndex:c,handleClose:$,allowHelpfulVoting:!0,allowReadReview:!0,showShoppableLink:!1})),G="SCROLL"===D?(0,_i.jsx)(tu,{media:H,totalMedia:a.length,isLoading:i,pageSize:Z,localizations:k,thumbnailSize:150,onClick:Y,onShowMore:K,modal:Q}):"SCROLL_LARGE"===D?(0,_i.jsx)(ou,{media:H,totalMedia:a.length,localizations:k,isLoading:i,pageSize:Z,onClick:Y,onShowMore:K,modal:Q}):"GRID_LARGE"===D||"GRID"===D?(0,_i.jsx)(du,{localizations:k,media:a,totalMedia:a.length,openModal:Y,modal:Q,imageSize:W,imageGroupSize:U,galleryType:D}):(0,_i.jsx)(Mu,{media:a,localizations:k,totalMedia:a.length,onClick:Y,modal:Q}),(0,_i.jsx)("div",{"data-testid":"review-image-display",lang:(0,or.H)(n),children:G}))}));Kp=r(68291).Z;var Yp=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){var e=this.props,t=e.config,r=e.localizations,n=e.onClose;return(0,_i.jsx)("section",{className:"pr-content-collection-form",children:(0,_i.jsx)(Td,{modalEnabled:!0,handleClose:n,localizations:r,children:(0,_i.jsx)(Kp,{config:t})})})},t}(xe.Component),$p=Yp,Xp=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a=75?"pr-reco-green":this.props.recommendedPercent>=50?"pr-reco-yellow":"pr-reco-red"},r.render=function(){var e=(this.props.className||"pr-reco")+" "+this.getColorClass();return(0,_i.jsxs)("div",{className:e,children:[(0,_i.jsx)("span",{className:"pr-reco-value",children:tf()(this.props.recommendedPercent).toFixed(0)+"% "}),this.props.text?"Recommended":null]})},t}(xe.Component),nf=rf,of=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){return(0,_i.jsx)("span",{className:"pr-checkbox-icon",children:(0,_i.jsxs)("svg",{viewBox:"0 0 176 176",focusable:"false","aria-hidden":"true",children:[(0,_i.jsx)("circle",{fill:this.props.invert?"#0A8900":"transparent",stroke:this.props.invert?"white":"#0A8900",strokeWidth:"8",cx:"88",cy:"88",r:"81.2"}),(0,_i.jsx)("path",{fill:this.props.invert?"white":"#0A8900",stroke:this.props.invert?"white":"#0A8900",strokeWidth:this.props.invert?5:1,d:"M77.2 121.3L43 87.2l5.5-5.6 28.7 28.6 50.3-50.3 5.5 5.6"})]})})},t}(mp.Z),af=of,sf=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){return(0,_i.jsx)("svg",d()(d()({width:"47px",height:"47px",viewBox:"0 0 47 47",focusable:"false","aria-hidden":"true"},this.props),{},{children:(0,_i.jsx)("g",{stroke:"none",strokeWidth:"1",fill:"none",children:(0,_i.jsxs)("g",{transform:"translate(2.000000, 2.000000)",children:[(0,_i.jsx)("circle",{stroke:"#757575",strokeWidth:"3",cx:"21.5",cy:"21.5",r:"21.5"}),(0,_i.jsx)("polygon",{fill:"#0A8900",points:"18.5829657 24.193701 14.1898693 19.8006046 11 22.9599101 18.4326062 30.392165 32.7856127 16.0391585 29.7464542 13"})]})})}))},t}(xe.Component),lf=sf,cf=function(e){var t;if(!e.localizations)return(0,_i.jsx)("div",{});var r,n=e.showEnhancedStyles?(0,_i.jsx)(lf,{}):(0,_i.jsx)(af,{invert:!0}),i=(0,fo.ZP)("review_display.4.0.snippet.recommended_text",e.localizations),o=Jl()(t=i.replace("{0}","")).call(t);return(0,_i.jsxs)("div",{className:"pr-snippet-reco-to-friend",children:[(0,_i.jsxs)("div",{className:"pr-snippet-reco-to-friend-percent "+(r=e.recommendedPercent,(r>=75?"pr-snippet-reco-to-friend-green":r>=50&&"pr-snippet-reco-to-friend-yellow")||r>=1&&"pr-snippet-reco-to-friend-red"||"pr-snippet-reco-to-friend-gray"),children:[e.recommendedPercent>75?(0,_i.jsx)("span",{"aria-hidden":"true",children:n}):null,(0,_i.jsx)(nf,{recommendedPercent:e.recommendedPercent})]}),(0,_i.jsx)("span",{className:"pr-reco-to-friend-message",children:o})]})},uf=function(e){var t=(0,Qi.e4)();return(0,_i.jsxs)("div",{className:vo()("pr-snippet-stars-reco-inline",{"pr-snippet-minimal":t<350,"pr-snippet-compact":t>=350&&t<650,"pr-snippet-standard":t>=650}),children:[(0,_i.jsx)("div",{className:"pr-snippet-stars-reco-stars",children:(0,_i.jsx)(Jp,d()({},e))}),e.recommendedPercent>60&&(0,_i.jsx)("div",{className:"pr-snippet-stars-reco-reco",children:(0,_i.jsx)(cf,d()({},e))}),(0,_i.jsx)("div",{style:{clear:"both"}})]})};uf.defaultProps={isCountLinkEnabled:!0};var df=(0,gi.$j)((function(e){return e}))(uf),pf=function(e){var t,r,n=e.productName,i=e.productKey,o=e.averageRating,a=e.reviewCount,s=(0,Ui.ZR)(),l=(0,Bt.x9)(s),c=l.showJSONLD,u=l.useNestedJSONLD,d=(null==s||null===(t=s.__COMPONENTKEYS)||void 0===t?void 0:t.CategorySnippet)||(null==s||null===(r=s.__COMPONENTKEYS)||void 0===r?void 0:r.ReviewSnippet);return c&&!u&&!d&&o&&a?(0,_i.jsx)(Xo,{children:(0,_i.jsx)(No,{ratingValue:o,reviewCount:a,children:(0,_i.jsx)(Uo,{children:(0,_i.jsx)(Mo,{name:n,parentID:s.structured_data_product_id||i})})})}):null},ff=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.reviewCount,o=e.countLabel,a=e.countType,s=e.warLinkLabel,l=e.averageRating,c=e.recommendedRatio,u=e.productName,d=e.productKey,p=e.localeOverride,f=e.merchantOverride,h=e.apiKeyOverride,m=(0,Se.v)(r,t),v=m.ENABLE_ENHANCED_SNAPSHOT_STYLES,g=m.STAR_STYLES;return(0,_i.jsxs)("section",{className:"pr-review-snapshot-snippets",children:[(0,_i.jsx)(df,{reviewCount:i,countLabel:o,countType:a,warLinkLabel:s,ratingValue:l,recommendedPercent:100*c,localizations:n,embeddedComponent:ul.nk,config:t,useQuarterStars:!0,isCountLinkEnabled:!1,starStyles:g,merchant_properties:r,productKey:d,localeOverride:p,merchantOverride:f,apiKeyOverride:h,showEnhancedStyles:v}),(0,_i.jsx)(pf,{config:t,merchantProperties:r,averageRating:l,reviewCount:i,productName:u,productKey:d})]})},hf=function(e){function t(){return e.apply(this,arguments)||this}return vi()(t,e),t.prototype.render=function(){return(0,_i.jsx)("svg",d()(d()({viewBox:"0 0 84 85",focusable:"false"},this.props),{},{children:(0,_i.jsxs)("g",{fill:"none",children:[(0,_i.jsx)("path",{d:"M44.378 25.846h-9.384v14.256h9.384c4.51 0 7.577-2.587 7.577-7.098 0-4.51-3.066-7.158-7.577-7.158zm.36 20.15h-9.744v16.839H28.5V23.25c0-1.677 1.59-3.237 3.332-3.237h12.906c8.362 0 13.715 5.534 13.715 12.991 0 7.459-5.353 12.993-13.715 12.993z",fill:"#888787"}),(0,_i.jsx)("path",{d:"M59.328 62.839l-9.852-14.175s-1.098.529-4.42.529h-3.201l9.39 13.655 8.083-.01",fill:"#888787"}),(0,_i.jsx)("path",{d:"M6.263 42.286c-.023-8.942 2.839-16.655 8.688-23.419l-4.737-4.097C3.338 22.72-.026 31.79 0 42.3c.06 23.154 18.878 41.877 42.03 41.818l-.015-6.255c-19.695.046-35.702-15.88-35.752-35.577",fill:"#75C6B8"}),(0,_i.jsx)("path",{d:"M77.261 47.07C74.814 64.809 59.924 77.818 42.02 77.864h-.005l.015 6.255c21.047-.054 38.549-15.346 41.425-36.194l-6.194-.855",fill:"#FBB817"}),(0,_i.jsx)("path",{d:"M64.05 6.584L60.748 11.9l.005.002C72.916 19.46 79.217 32.883 77.26 47.07l6.194.855c2.3-16.675-5.107-32.456-19.405-41.34",fill:"#53C7E6"}),(0,_i.jsx)("path",{d:"M60.748 11.899l3.302-5.315c-10.719-6.66-22.427-8.17-34.485-4.452l1.846 5.984.004-.001C41.67 4.95 51.63 6.235 60.748 11.899",fill:"#8AC734"}),(0,_i.jsx)("path",{d:"M31.411 8.116l-1.846-5.984c-8.03 2.479-13.853 6.28-19.35 12.638l4.736 4.097.002-.001c4.676-5.409 9.628-8.642 16.458-10.75",fill:"#F05E24"})]})}))},t}(xe.Component),mf=hf,vf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations;return r.IS_COBRANDED?(0,Se.$)("ENABLE_ENHANCED_SNAPSHOT_STYLES",r,t)?(0,_i.jsxs)("a",{className:"pr-subheadline",href:"http://www.powerreviews.com",target:"_blank",rel:"noopener noreferrer",children:[(0,_i.jsx)(mp.Z,{className:"pr-snapshot-logo"}),(0,_i.jsx)(mf,{className:"pr-snapshot-logo-mobile"})]}):(0,_i.jsxs)("p",{className:"pr-subheadline",children:[(0,_i.jsx)("span",{children:(0,fo.ZP)("review_display.4.0.snapshot.by",n)+" "}),(0,_i.jsx)("a",{href:"http://www.powerreviews.com",target:"_blank",rel:"noopener noreferrer",children:"PowerReviews"})]}):null},gf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations;return(0,_i.jsx)(Zi.X6,{importance:1,shouldUseSpan:(0,Se.$)("DISABLE_CD4_HEADING_STRUCTURES",r,t),className:"pr-headline",children:(0,fo.ZP)("review_display.4.0.snapshot.header",n)})},_f=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations;return(0,_i.jsxs)("div",{className:"pr-review-snapshot-header-intro",children:[(0,_i.jsx)(gf,{config:t,merchantProperties:r,localizations:n}),(0,_i.jsx)(vf,{config:t,merchantProperties:r,localizations:n})]})},yf=function(e){for(var t=e.languages,r=e.overrideMerchantAndLocale,n=e.localeOverride,i=e.merchantOverride,o=e.localizations,a=0,s=0;s0?Math.round(t/o*100):0,"%"]})]},r));else{var u=function(t,r){return a?(0,zl.W)(a,r)+" "+e.labels[t]+". "+(0,zl.W)(e.tooltipText,t+1):""+(0,zl.W)(e.tooltipText,t+1)}(r,t),d=function(e,t){return a?(0,zl.W)(a,t)+". "+(0,zl.W)(s,e+1):""+(0,zl.W)(s,e+1)}(r,t);i.unshift((0,_i.jsx)("li",{className:"pr-ratings-histogram-list-item",children:(0,_i.jsxs)("div",{role:"button",tabIndex:t>0?"0":"-1","aria-label":n&&r+1===n?d:u,className:"pr-histogram-"+[r+1]+"Stars "+(c||"")+" pr-histogram-stars"+(r+1===n?" pr-hist-filter-"+n:""),onClick:"pr-zero-ratings"===c?null:e.callback.bind(xf,r+1,e.type),onKeyDown:"pr-zero-ratings"===c?null:Ef.bind(xf,e,r+1),"aria-disabled":0===t,children:[(0,_i.jsx)("p",{className:"pr-histogram-label","aria-hidden":"true",children:e.labels[r]}),(0,_i.jsx)("div",{"data-tooltip":""+e.tooltipText.replace("{0}",r+1),className:"pr-ratings-histogram-bar-container","aria-hidden":"true",children:(0,_i.jsx)("div",{className:"pr-ratings-histogram-bar",children:l})}),(0,_i.jsx)("p",{className:"pr-histogram-count","aria-hidden":"true",children:""+(0===t?"0":t)}),(0,_i.jsx)("div",{className:"pr-histogram-cross","aria-hidden":"true",children:n&&r+1===n?(0,_i.jsx)(Is,{}):null})]})},r))}})),(0,_i.jsx)("ul",{className:"pr-ratings-histogram pr-histogram-list",children:i})};Sf.defaultProps={divIdKey:"",type:"rating",reviewRatings:[0,0,0,0,0],tooltipText:"Show only {0} star reviews",localizations:{},labels:["1 Star","2 Stars","3 Stars","4 Stars","5 Stars"]};var Cf=Sf,jf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.activeFilters,o=e.onRatingFilter,a=e.histogramValues,s=e.onHistogramVisible,l=(0,fo.ZP)("review_display.4.0.snapshot.ratings_distribution",n),c=(0,xe.useRef)((0,Jo.x0)()).current,u=(0,Qi.rP)(s).ref;return(0,_i.jsx)("section",{className:"pr-review-snapshot-block pr-review-snapshot-block-histogram","aria-labelledby":c,children:(0,_i.jsxs)("div",{className:"pr-review-snapshot-histogram",ref:u,children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:1,id:c,shouldUseSpan:(0,Se.$)("DISABLE_CD4_HEADING_STRUCTURES",r,t),className:"pr-review-snapshot-block-headline",children:l})}),(0,_i.jsx)(Cf,{type:"rating",filters:i,reviewRatings:a,callback:o,tooltipText:(0,fo.ZP)("review_display.4.0.snapshot.filter_star_text",n),localizations:n,labels:[(0,fo.ZP)("review_display.4.0.snapshot.histogram_star_label_one",n),(0,fo.ZP)("review_display.4.0.snapshot.histogram_star_label_two",n),(0,fo.ZP)("review_display.4.0.snapshot.histogram_star_label_three",n),(0,fo.ZP)("review_display.4.0.snapshot.histogram_star_label_four",n),(0,fo.ZP)("review_display.4.0.snapshot.histogram_star_label_five",n)]})]})})},If=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.averageRating,o=e.reviewCount,a=e.countLabel,s=e.countType,l=e.warLinkLabel,c=e.productName,u=e.productKey,d=(0,Se.v)(r,t),p=d.DISABLE_CD4_HEADING_STRUCTURES,f=d.STAR_STYLES;return(0,_i.jsx)("section",{className:"pr-review-snapshot-block pr-review-snapshot-block-snippet",children:(0,_i.jsxs)("section",{className:"pr-review-snapshot-snippets",children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:1,shouldUseSpan:p,className:"pr-review-snapshot-snippets-headline",children:_o(i)})}),(0,_i.jsx)(Jp,{reviewCount:o,countLabel:a,countType:s,warLinkLabel:l,ratingValue:i,localizations:n,embeddedComponent:ul.nk,config:t,useQuarterStars:!0,isCountLinkEnabled:!1,starStyles:f,merchant_properties:r,productKey:u}),(0,_i.jsx)(pf,{config:t,merchantProperties:r,averageRating:i,reviewCount:o,productName:c,productKey:u})]},"snippet")})},kf=function(e){var t=e.merchantProperties,r=e.localizations,n=e.recommendedRatio,i=vo()("pr-review-snapshot-block","pr-review-snapshot-block-recommend",{"pr-hide":!n});return(0,_i.jsx)("section",{className:i,children:(0,_i.jsx)("section",{className:"pr-review-snapshot-recomend",children:(0,_i.jsx)(cf,{recommendedPercent:100*n,localizations:r,merchant_properties:t})},"recommend")})},Nf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.activeFilters,o=e.onRatingFilter,a=e.histogramValues,s=e.averageRating,l=e.reviewCount,c=e.countLabel,u=e.countType,d=e.warLinkLabel,p=e.productName,f=e.productKey,h=e.recommendedRatio,m=e.onHistogramVisible;return(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)(If,{config:t,merchantProperties:r,localizations:n,averageRating:s,reviewCount:l,countLabel:c,countType:u,warLinkLabel:d,productName:p,productKey:f}),(0,_i.jsx)(kf,{merchantProperties:r,localizations:n,recommendedRatio:h}),(0,_i.jsx)(jf,{config:t,merchantProperties:r,localizations:n,activeFilters:i,onRatingFilter:o,histogramValues:a,onHistogramVisible:m})]})},Rf=xe.forwardRef((function(e,t){var r,n,i=e.theme,a=e.className,s=e.buttonKey,l=e.ariaLabel,c=e.children,u=e.type,d=e.dataTooltip,p=e.toolTipText,f=e.onClick;return(0,_i.jsx)("button",{type:"button","aria-label":l,"data-tooltip":d,"data-filter-tooltip":p,ref:t,onClick:function(e){e.preventDefault(),f(s,u,e)},className:i?"pr-filter-btn pr-filter-btn--"+i+" "+(a||""):"pr-filter-btn pr-snapshot-tag-def "+(a||""),children:!!c&&y()(r=o()(n=[]).call(n,c)).call(r,(function(e){return e}))})})),Pf=Rf,Tf=function(e,t,r){return!(1!==Number((0,Se.$)("ENABLE_REVIEW_FILTERING",t))&&!r.ENABLE_REVIEW_FILTERING)},Af=function(e){var t,r=e.config,n=e.merchantProperties,i=e.msq,o=e.type,a=e.localizations,s=e.activeFilters,l=e.onFilter,c=Tf(r.merchant_id,r,n),u=m()(s).call(s,(function(e){return e.attribute===o})),d=(0,fo.ZP)("review_display.4.0.review_tag_groups."+o,a);if(i){var p,f,h,v=y()(p=gn()(i)).call(p,(function(e){return{tagName:e.label,tagValue:e.count}}));t=y()(f=Ni()(h=Yt()(v).call(v,(function(e,t){return t.tagValue-e.tagValue}))).call(h,0,5)).call(f,(function(e){var t=e.tagName,r=e.tagValue,n=!!m()(u).call(u,(function(e){return e.value===t})).length,i=vo()("pr-snapshot-tag-def",{"pr-snapshot-tag-def-filtering--active":n,"pr-snapshot-tag-def-filtering":c});return c?(0,_i.jsx)("dd",{className:i,children:(0,_i.jsxs)(Pf,{dataTooltip:""+(0,fo.ZP)("review_display.4.0.snapshot.msqs.filter_tooltip",a),ariaLabel:n?(0,Jo.WU)((0,fo.ZP)("review_display.4.0.snapshot.msqs.remove_filter",a),r,t):(0,Jo.WU)((0,fo.ZP)("review_display.4.0.snapshot.msqs.apply_filter",a),r,t),className:n?"pr-filter-btn--active":"",onClick:l,type:o,theme:"default",buttonKey:t,children:[(0,_i.jsx)("span",{"aria-hidden":"true",className:"pr-filter-btn__child pr-snapshot-highlight pr-filter-btn__voteCount",children:r}),(0,_i.jsx)("span",{"aria-hidden":"true",className:"pr-filter-btn__child pr-filter-btn__buttonText",children:t.charAt(0).toUpperCase()+Ni()(t).call(t,1)}),n&&(0,_i.jsx)(Is,{className:"pr-filter-btn__child pr-filter-btn__icon"})]})},t):(0,_i.jsxs)("dd",{className:"pr-snapshot-tag-def",children:[(0,_i.jsx)("span",{className:"pr-snapshot-highlight",children:r}),(0,_i.jsx)("span",{children:t.charAt(0).toUpperCase()+Ni()(t).call(t,1)})]},t)}))}else{var g=(0,Jo.WU)((0,fo.ZP)("review_display.4.0.snapshot.no_tags",a),d);t=(0,_i.jsx)("dd",{className:"pr-snapshot-tag-def",children:g},"no-"+o)}var _=(0,xe.useRef)((0,Jo.x0)()).current;return(0,_i.jsx)("section",{"aria-labelledby":_,className:"pr-review-snapshot-block pr-review-snapshot-block-"+o,"data-pr-no-data":!i||void 0,children:(0,_i.jsxs)("dl",{className:"pr-review-snapshot-tags",children:[(0,_i.jsx)("dt",{children:(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:1,id:_,shouldUseSpan:(0,Se.$)("DISABLE_CD4_HEADING_STRUCTURES",n,r),className:"pr-review-snapshot-block-headline",children:d})})}),t]})})},Lf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.activeFilters,o=e.prosMSQ,a=e.consMSQ,s=e.onFilter,l=e.onRatingFilter,c=e.histogramValues,u=e.onHistogramVisible;return(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)(jf,{config:t,merchantProperties:r,localizations:n,activeFilters:i,onRatingFilter:l,histogramValues:c,onHistogramVisible:u}),(0,_i.jsx)(Af,{config:t,merchantProperties:r,localizations:n,activeFilters:i,onFilter:s,type:"pros",msq:o}),(0,_i.jsx)(Af,{config:t,merchantProperties:r,localizations:n,activeFilters:i,onFilter:s,type:"cons",msq:a})]})},Of=function(e){var t=e.merchantProperties,r=e.localizations,n=e.config,i=e.brandScore,o=i.brand_name,a=i.category_name,s=i.average_rating,l=void 0===s?0:s,c=i.score_type,u=(0,Jo.WU)((0,Jo.Ip)("review_display.4.0.snapshot.brand_score.title",r),o),d="Brand"!==c?(0,Jo.WU)((0,Jo.Ip)("review_display.4.0.snapshot.brand_score.description",r),o,a):(0,Jo.WU)((0,Jo.Ip)("review_display.4.0.snapshot.brand_score.description_brand_level",r),o),p=(0,Jo.WU)((0,Jo.Ip)("review_display.4.0.snapshot.brand_score.accessible_rating_text",r),l),f=100*l/5+"%",h=(0,xe.useRef)((0,Jo.x0)());return(0,_i.jsx)("section",{"aria-labelledby":h.current,className:"pr-review-snapshot-block pr-review-snapshot-block-brandscore",children:(0,_i.jsxs)("div",{className:"pr-review-snapshot-brandscore",children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:1,id:h.current,shouldUseSpan:(0,Jo.$s)("DISABLE_CD4_HEADING_STRUCTURES",t,n),className:"pr-brandscore-headline",children:u})}),(0,_i.jsx)("p",{className:"pr-brandscore-description",children:d}),(0,_i.jsxs)("div",{className:"pr-brandscore-bargraph",children:[(0,_i.jsxs)("div",{className:"pr-brandscore-bargraph-barcontainer","aria-hidden":!0,children:[(0,_i.jsx)("div",{className:"pr-brandscore-bargraph-fullbar"}),(0,_i.jsx)("div",{className:"pr-brandscore-bargraph-colorbar",style:{width:f}})]}),(0,_i.jsxs)("span",{className:"pr-brandscore-score","aria-hidden":!0,children:[(0,_i.jsx)("b",{children:l})," / 5"]}),(0,_i.jsx)("span",{className:"pr-accessible-text",children:p})]})]})})},Df=function(e){var t,r=e.config,n=e.merchantProperties,i=e.localizations,o=e.brandScore,a=e.productName,s=e.productKey,l=e.simpleSnapshot,c=e.showBrandScore,u=vo()("pr-review-snapshot-block-container",{"pr-review-snapshot-simple":l||c,"pr-review-snapshot-simple--brandscore":c}),p=(0,Jo.vw)(n).ENABLE_RATING_ONLY_COLLECTION;return t=c?(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)(If,{config:r,merchantProperties:n,localizations:i,productName:a,productKey:s,averageRating:0,reviewCount:0,warLinkLabel:(0,Jo.Ip)("review_display.4.0.write_the_first_review",i),countType:!0===p?"rating":"review",countLabel:(0,Jo.Ip)(!0===p?"review_display.4.0.common.no_ratings":"review_display.4.0.no_reviews",i)}),(0,_i.jsx)(Of,{config:r,merchantProperties:n,localizations:i,brandScore:o})]}):l?(0,_i.jsx)(Nf,d()({},e)):(0,_i.jsx)(Lf,d()({},e)),(0,_i.jsx)("div",{className:u,children:t},"block")},Mf=function(e){var t,r,n=e.size,i=e.selected,o=e.minText,a=e.maxText,s=e.className,l=e.textStyle,c=e.selectedLabel,u=y()(t=Ni()(r=[0,0,0,0,0]).call(r,0,n)).call(t,(function(e,t){return(0,_i.jsx)("div",{className:vo()("pr-slider-node",{"pr-active":Math.round(i)===t})},t)})),d="above"===l,p=(0,_i.jsx)("div",{className:"pr-min-text","aria-hidden":"true",children:o}),f=(0,_i.jsx)("div",{className:"pr-max-text","aria-hidden":"true",children:a});return(0,_i.jsxs)("div",{className:vo()("pr-slider-root "+s,{"pr-text-above-root":d}),children:[d&&(0,_i.jsxs)("div",{className:"pr-slider-text-above",children:[p,f]}),!d&&p,(0,_i.jsxs)("div",{className:"pr-slider"+(d?" pr-text-above":""),role:"img","aria-label":c,children:[(0,_i.jsx)("div",{className:"pr-slider-node-group",children:u}),(0,_i.jsx)("div",{className:"pr-slider-line"})]}),!d&&f]})};Mf.defaultProps={size:5,selected:2,minText:"Runs Small",maxText:"Runs Large",className:"",textStyle:"sides"};var Ff=Mf,zf=function(e){var t=e.config,r=e.merchantProperties,n=e.histogramMSQs,i=e.simpleSnapshot;if(!n.length)return null;var o=vo()("pr-review-snapshot-msq-container","pr-review-snapshot-histogram-msq-container",{"pr-review-snapshot-histogram-msq-simple":i});return(0,_i.jsx)("section",{className:o,children:y()(n).call(n,(function(e){var n=e.display_values,i=gn()(e),o=e.name,a=e.key;if(!n||!i)return(0,_i.jsx)("div",{},a);var s=y()(n).call(n,(function(t,r){var n,i=m()(n=gn()(e)).call(n,(function(e){return e.label===t}))[0];return i?d()(d()({},i),{},{position:r}):{label:t,count:0,position:r}})),l=y()(s).call(s,(function(e){return e.count}));return l.every((function(e){return 0===e}))?(0,_i.jsx)("div",{},a):(0,_i.jsxs)("section",{id:"msq-histogram-"+a,"data-testid":"msq-histogram-"+a,className:"pr-review-snapshot-msq pr-review-snapshot-msq-histogram",children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:2,className:"pr-histogram-msq-headline",children:o})}),(0,Se.$)("ENABLE_ENHANCED_SNAPSHOT_STYLES",r,t)?(0,_i.jsx)(Ff,{className:"pr-histogram-msq-slider",textStyle:"above",selected:(0,Bt.iv)(s),selectedLabel:(0,Bt.g_)(s),minText:n[0],maxText:n[n.length-1]}):(0,_i.jsx)(Cf,{type:"msq",reviewRatings:l,labels:n})]},a)}))})},Vf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.subratingMSQs;return i.length?(0,_i.jsx)("section",{className:"pr-review-snapshot-msq-container pr-review-snapshot-subratings",children:y()(i).call(i,(function(e){var i=e.key,o=e.name,a=e.value,s=(0,Jo.WU)((0,fo.ZP)("review_display.4.0.common.rated_x_out_of_y",n),_o(a));return(0,_i.jsxs)("dl",{className:"pr-rd-def-list pr-msq-list pr-review-snapshot-msq-"+i,children:[(0,_i.jsx)("dt",{children:o.charAt(0).toUpperCase()+Ni()(o).call(o,1)}),(0,_i.jsx)("dd",{children:(0,_i.jsx)("div",{children:(0,_i.jsx)("div",{children:(0,_i.jsx)(xo,{isInteractive:!1,preset:a,ratingValue:a,useQuarterStars:!0,starStyles:(0,Se.$)("pr_star_styles",r,t),ratingLabel:s})})})})]},"subrating-"+i)}))}):null},qf="+",Wf=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;at,l=t>5&&t!==n;return(0,_i.jsxs)(xe.Fragment,{children:[l&&(0,_i.jsx)("dd",{children:(0,_i.jsxs)("button",{className:"pr-less-button","aria-label":(0,fo.ZP)("review_display.4.0.snapshot.msqs.less",a),onClick:function(e){return r.handleLessClick(e)},children:[(0,_i.jsx)("span",{"aria-hidden":!0,children:"[-"}),(0,_i.jsx)("span",{children:(0,fo.ZP)("review_display.4.0.snapshot.msqs.less",a)}),(0,_i.jsx)("span",{"aria-hidden":!0,children:"]"})]})}),s&&(0,_i.jsx)("dd",{children:(0,_i.jsxs)("button",{ref:function(e){r.state.nextFocus===qf&&(r.activeElementRef.current=e)},className:"pr-more-button",onClick:function(e){return r.handleMoreClick(e,t)},children:[(0,_i.jsx)("span",{"aria-hidden":!0,children:"[+"}),(0,_i.jsx)("span",{children:(0,fo.ZP)("review_display.4.0.snapshot.msqs.more",a)}),(0,_i.jsx)("span",{"aria-hidden":!0,children:"]"})]})})]})})),r}vi()(t,e);var r=t.prototype;return r.componentDidUpdate=function(e){e.nextFocus!==this.state.nextFocus&&this.activeElementRef.current&&this.activeElementRef.current.focus()},r.render=function(){var e,t,r=this,n=this.props,i=n.msq,o=n.filters,a=n.isFilteringEnabled,s=n.onFilter,l=n.localizations,c=n.disableHeadingStructures,u=this.state.visibleMSQTagCount,d=gn()(i);if("textbox"===i.type&&Array.isArray(gn()(i))){var p,f,h=b()(p=gn()(i)).call(p,(function(e,t){return e[t]=e[t]?e[t]+1:1,e}),{});d=y()(f=g()(h)).call(f,(function(e){return{label:e,count:h[e]}}))}Yt()(d).call(d,(function(e,t){return t.count-e.count}));var v=b()(d).call(d,(function(e,t,r){return o&&m()(o).call(o,(function(e){return e.value===t.label}))[0]?r+1:e}),0),_=Math.max(u,v,this.highestFilterCount);return this.highestFilterCount=_,(0,_i.jsxs)("dl",{className:"pr-msq-list pr-review-snapshot-msq pr-review-snapshot-msq-"+i.key,children:[(0,_i.jsx)("dt",{children:(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:3,shouldUseSpan:c,children:i.name.charAt(0).toUpperCase()+Ni()(e=i.name).call(e,1)})})}),y()(t=Ni()(d).call(d,0,_)).call(t,(function(e,t){var n=e.label,c=e.count,u=o&&m()(o).call(o,(function(e){return e.value===n}))[0];return(0,_i.jsx)("dd",{children:a?(0,_i.jsxs)(Pf,{className:u?"pr-filter-btn--active":"",type:i.key,onClick:s,buttonKey:n,theme:"button-separated",ariaLabel:u?(0,zl.W)((0,fo.ZP)("review_display.4.0.snapshot.msqs.remove_filter",l),c,n):(0,zl.W)((0,fo.ZP)("review_display.4.0.snapshot.msqs.apply_filter",l),c,n),toolTipText:(0,fo.ZP)("review_display.4.0.snapshot.msqs.filter_tooltip",l),ref:function(e){t===r.state.nextFocus&&(r.activeElementRef.current=e)},children:[(0,_i.jsx)("span",{className:"pr-filter-btn__child pr-filter-btn__buttonText",children:n.charAt(0).toUpperCase()+Ni()(n).call(n,1)}),(0,_i.jsx)("span",{className:"pr-filter-btn__child pr-filter-btn__voteCount",children:c})]},n):(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)("span",{className:"pr-snapshot-highlight",children:c}),n.charAt(0).toUpperCase()+Ni()(n).call(n,1)]})},n)})),this.renderMoreLessButtons(d.length,_,v)]},""+i.name)},t}(xe.Component),Uf=Wf,Zf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.simpleSnapshot,o=e.otherMSQs,a=e.activeFilters,s=e.onFilter,l=Tf(t.merchant_id,t,r);return!o.length||i||"DROPDOWNS"===(0,Se.$)("REVIEW_FILTERING_TYPE",r,t)?null:(0,_i.jsx)("section",{className:"pr-review-snapshot-msq-container pr-review-snapshot-msqs",children:y()(o).call(o,(function(e){var i=m()(a).call(a,(function(t){return t.attribute===e.key}));return(0,_i.jsx)(Uf,{disableHeadingStructures:(0,Se.$)("DISABLE_CD4_HEADING_STRUCTURES",r,t),msq:e,isFilteringEnabled:l,filters:i,onFilter:s,localizations:n},e.key)}))})},Bf=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a0;return(0,_i.jsx)("section",{className:m,children:(0,_i.jsxs)(Zi.y5,{children:[(0,_i.jsx)(Zi.X6,{importance:1,shouldUseSpan:f,className:"pr-faceoff-label",children:o}),(0,_i.jsx)("div",{children:(0,_i.jsx)(xo,{isInteractive:!1,preset:d,ratingValue:d,starStyles:h,ratingLabel:(0,zl.W)((0,fo.ZP)("review_display.4.0.common.rated_x_out_of_y",n),d)})}),(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:2,shouldUseSpan:f,className:"pr-faceoff-title",id:this.headlineId,children:u})}),(0,_i.jsxs)("p",{className:"pr-faceoff-review",children:[y,!0===b&&!1===s?"...":null,b?(0,_i.jsx)("span",{id:this.commentBelowFoldId,style:{display:s?"inline":"none"},children:w}):null]}),b?(0,_i.jsxs)("button",{type:"button",className:g,onClick:this.toggleExpand,"aria-controls":this.commentBelowFoldId,"aria-expanded":s,"aria-describedby":this.headlineId,children:[v,(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"4"})]}):null]})})},t}(xe.Component),Hf=Bf,Kf=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.faceoffNegative,o=e.faceoffPositive,a=(0,bi.dZ)(t.page_id,ul.nk);if(!r.FACE_OFF_ENABLED)return null;if(!i||!o)return(0,_i.jsx)("div",{className:"pr-faceoff-empty"});var s={config:t,merchantProperties:r,localizations:n};return(0,_i.jsxs)("section",{className:"pr-review-snapshot-faceoff",children:[(0,_i.jsx)(Hf,d()({faceoffData:o,label:(0,fo.ZP)("review_display.4.0.snapshot.most_liked_positive_review",n),className:"pr-faceoff-positive",onExpand:function(){return a(bi.GM.REVIEW_SNAPSHOT_FACEOFF_POSITIVE(o.ugc_id))}},s)),(0,_i.jsxs)("div",{className:"pr-faceoff-img",children:[(0,_i.jsx)("span",{className:"pr-accessible-text",children:(0,fo.ZP)("review_display.4.0.snapshot.versus",n)}),(0,_i.jsx)("span",{className:"pr-faceoff-img-txt","aria-hidden":"true",children:"VS"})]}),(0,_i.jsx)(Hf,d()({faceoffData:i,label:(0,fo.ZP)("review_display.4.0.snapshot.most_liked_negative_review",n),className:"pr-faceoff-negative",onExpand:function(){return a(bi.GM.REVIEW_SNAPSHOT_FACEOFF_NEGATIVE(i.ugc_id))}},s))]})},Gf=r(24949),Qf=function(e){return e.Reviews||{}},Yf=function(e,t){return t.config||{}},$f=(0,Gf.P1)(Qf,Yf,(function(e,t){return(0,Nt.iC)(t,e.localeOverride,e.merchantOverride)})),Xf=(0,Gf.P1)(Qf,$f,(function(e,t){return e[t]||{}})),Jf=(0,Gf.P1)(Xf,(function(e){return e.rollup||{}})),eh=(0,Gf.P1)(Xf,(function(e){return e&&e.localizations})),th=((0,Gf.P1)(Xf,(function(e){return e&&e.merchantProperties})),(0,Gf.P1)(Jf,(function(e){return e.name}))),rh=(0,Gf.P1)(Jf,(function(e){return e.average_rating})),nh=(0,Gf.P1)(Jf,(function(e){return e.review_count})),ih=(0,Gf.P1)(Jf,(function(e){return e.rating_count})),oh=(0,Gf.P1)(Xf,(function(e){return e.filters||[]})),ah=(0,Gf.P1)(Xf,(function(e){return e.sorts||[]})),sh=((0,Gf.P1)(Xf,(function(e){return e.reviews||[]})),(0,Gf.P1)(Xf,(function(e){return e.isLoading}))),lh=(0,Gf.P1)(Xf,(function(e){return e.reviewsLoaded})),ch=(0,Gf.P1)(Jf,(function(e){return e.rating_histogram})),uh=(0,Gf.P1)(Jf,(function(e){return e.review_histogram})),dh=(0,Gf.P1)(Jf,(function(e){return e.recommended_ratio||0})),ph=(0,Gf.P1)(Jf,(function(e){return e.faceoff_negative})),fh=(0,Gf.P1)(Jf,(function(e){return e.faceoff_positive})),hh=(0,Gf.P1)(Jf,(function(e){return e.properties||[]})),mh=(0,Gf.P1)(hh,(function(e){return m()(e).call(e,(function(e){return"pros"===e.key}))[0]})),vh=(0,Gf.P1)(hh,(function(e){return m()(e).call(e,(function(e){return"cons"===e.key}))[0]})),gh=(0,Gf.P1)(hh,(function(e){return m()(e).call(e,(function(e){return"subrating"===e.type}))})),_h=(0,Gf.P1)(hh,(function(e){return m()(e).call(e,(function(e){return"histogram"===e.display_type}))})),yh=(0,Gf.P1)(hh,(function(e){return m()(e).call(e,(function(e){return"histogram"!==e.display_type&&"subrating"!==e.type&&"pros"!==e.key&&"cons"!==e.key}))})),wh=(0,Gf.P1)(Jf,(function(e){return e.page_brand_score})),bh=[{name:"pr-snapshot-desktop",width:980},{name:"pr-snapshot-tablet",width:780},{name:"pr-snapshot-mobile",width:1}],xh=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a1?(0,Jo.WU)((0,fo.ZP)(n,i),e):(0,fo.ZP)(o,i)}if(!I&&!r.languages&&!k||!i)return(0,_i.jsx)("div",{"data-testid":"review-snapshot"});var R=(0,Se.v)(n,r),P=R.ENABLE_ENHANCED_SNAPSHOT_STYLES,T=R.ENABLE_RATING_ONLY_COLLECTION,A=R.REVIEW_DISPLAY_SNAPSHOT_TYPE,L=R.STAR_STYLES,O=T,D=O?"rating":"review",M=O?N(c,{singular:"review_display.4.0.snapshot.rating_count_singular",plural:"review_display.4.0.snapshot.rating_count_plural",none:"review_display.4.0.common.no_ratings"}):N(l,{singular:"review_display.4.0.common.review_count_singular",plural:"review_display.4.0.common.review_count_plural",none:"review_display.4.0.no_reviews"});function F(e){return(0,fo.ZP)(e?"review_display.4.0.write_a_review":"review_display.4.0.write_the_first_review",i)}var z=F(O?c:l),V="SIMPLE"===A,q=vo()("pr-review-snapshot",{"pr-review-accessible":"ORANGE_ACCESSIBILITY_COMPLIANT"===L,"pr-review-enhanced":P});return(0,_i.jsx)(Qi.iX,{sizes:bh,children:(0,_i.jsxs)("section",{id:"pr-review-snapshot","data-testid":"review-snapshot",className:q,lang:(0,or.H)(E),children:[(0,_i.jsx)("span",{tabIndex:"-1",className:"pr-accessible-focus-element",id:"review-snapshot-focus-target","aria-hidden":"true"}),(0,_i.jsx)(bf,{config:r,merchantProperties:n,localizations:i,productName:o,productKey:a,simpleSnapshot:V,reviewCount:l,countLabel:M,countType:D,warLinkLabel:z,averageRating:s,recommendedRatio:f,overrideMerchantAndLocale:x,showFullSnapshot:I,localeOverride:E,merchantOverride:S,apiKeyOverride:C}),(I||k)&&(0,_i.jsxs)(xe.Fragment,{children:[(0,_i.jsx)(Df,{config:r,merchantProperties:n,localizations:i,simpleSnapshot:V,activeFilters:u,prosMSQ:h,consMSQ:m,histogramValues:d,averageRating:s,reviewCount:l,countLabel:M,countType:D,warLinkLabel:z,productName:o,productKey:a,recommendedRatio:f,brandScore:b,showBrandScore:k,onFilter:this.handleFilter,onRatingFilter:function(t){var r=0===p[t-1]?t:null;e.handleRatingFilter(t,r)},onHistogramVisible:this.handleHistogramVisibilityChange}),(0,_i.jsx)(zf,{config:r,merchantProperties:n,localizations:i,histogramMSQs:v,simpleSnapshot:V}),(0,_i.jsx)(Vf,{config:r,merchantProperties:n,localizations:i,subratingMSQs:g}),(0,_i.jsx)(Zf,{config:r,merchantProperties:n,localizations:i,otherMSQs:_,simpleSnapshot:V,activeFilters:u,onFilter:this.handleFilter}),(0,_i.jsx)(Kf,{config:r,merchantProperties:n,localizations:i,faceoffNegative:y,faceoffPositive:w,sendBeacon:j})]})]})})},t}(xe.Component),Eh={getReviews:Ar,sortAndFilter:Or,overrideMerchantAndLocale:function(e){var t=e.locale,r=e.merchant_id,n=e.api_key;return{type:Tr,locale:t,merchant_id:r,api_key:n}}},Sh=(0,gi.$j)((function(e,t){var r=oh(e,t),n=m()(r).call(r,(function(e){return"rating"===e.attribute}))[0]?m()(r).call(r,(function(e){return"rating"===e.attribute}))[0].value[0]:0,i=b()(r).call(r,(function(e,t){return e+(t.value&&t.value.length)||0}),0);return{localeOverride:e.Reviews.localeOverride,merchantOverride:e.Reviews.merchantOverride,apiKeyOverride:e.Reviews.apiKeyOverride,config:Yf(0,t),localizations:eh(e,t),productName:th(e,t),productKey:$f(e,t),averageRating:rh(e,t),reviewCount:nh(e,t),ratingCount:ih(e,t),histogramValues:ch(e,t),reviewHistogramValues:uh(e,t),recommendedRatio:dh(e,t),prosMSQ:mh(e,t),consMSQ:vh(e,t),histogramMSQs:_h(e,t),subratingMSQs:gh(e,t),otherMSQs:yh(e,t),isLoading:sh(e,t),activeSorts:ah(e,t),faceoffNegative:ph(e,t),faceoffPositive:fh(e,t),brandScore:wh(e,t),activeFilters:r,filterCount:i,ratingFilter:n,reviewsLoaded:lh(e,t)}}),Eh)((function(e){var t=(0,xe.useContext)(Ui.E_),r=t.localizations,n=t.merchantProperties,i=t.displayApi;e.merchantOverride&&e.localizations&&(r=e.localizations);var o=(0,bi.dZ)(e.config.page_id,ul.nk);return(0,_i.jsx)(xh,d()(d()({},e),{},{sendBeacon:o,localizations:r,merchantProperties:n,displayApi:i}))})),Ch=function(e){function t(t){var r,n;return(n=e.call(this,t)||this).showWARForm=(r=n).showWARForm.bind(r),n.onWriteReviewClick=(r=n).onWriteReviewClick.bind(r),n}vi()(t,e);var r=t.prototype;return r.onWriteReviewClick=function(e){return e.preventDefault(),this.props.writeReviewCallback&&"function"==typeof this.props.writeReviewCallback?this.props.writeReviewCallback():this.props.isModalEnabled?this.showWARForm():void(document.location=this.props.wrapperUrl)},r.showWARForm=function(){if(this.props.showFormCallback)return this.props.showFormCallback()},r.render=function(){return(0,_i.jsx)("a",{href:this.props.wrapperUrl?this.props.wrapperUrl:"#",className:"pr-snippet-write-review-link",onClick:this.onWriteReviewClick,rel:"nofollow",children:this.props.children})},t}(xe.Component);po()(Ch,"defaultProps",{wrapperUrl:"",writeReviewCallback:function(){return null},showFormCallback:function(){return null},isModalEnabled:!1});var jh=Ch,Ih=function(e){var t=e.className,r=e.config,n=e.merchantProperties,i=e.localizations,o=e.localeOverride,a=e.merchantOverride,s=(0,Se.v)(n,r),l=s.ENABLE_CONTENT_COLLECTION_MODAL,c=s.BATCHED_PAGE_IDS,u=s.ON_WRITE_REVIEW_CLICK,d=(0,xe.useState)(!1),p=d[0],f=d[1],h=(0,Bt.Em)(r,n,o,a),m=l&&!c;return(0,_i.jsxs)("section",{id:"pr-review-display",className:t,children:[(0,_i.jsx)("div",{className:"pr-rd-no-reviews",children:(0,_i.jsx)(jh,{wrapperUrl:h,writeReviewCallback:u||null,showFormCallback:l?function(){return f(!0)}:null,isModalEnabled:m,children:(0,fo.ZP)("review_display.4.0.write_the_first_review",i)})}),l&&p&&(0,_i.jsx)($p,{config:r,localizations:i,onClose:function(){return f(!1)}})]})},kh=function(e){var t,r=(0,xe.useRef)();return(0,_i.jsxs)("div",{className:e.className,children:[!!e.fieldGroupLabel&&(0,_i.jsx)("label",{htmlFor:e.id,children:e.fieldGroupLabel}),(0,_i.jsx)("select",{id:e.id,className:"pr-rd-sort",onChange:function(t){var n,i=t.target;(e.onSortChange(i.value),(null==r?void 0:r.current)!==document.activeElement)&&(null===(n=r.current)||void 0===n||n.focus())},ref:r,"aria-label":e.accessibleLabel?e.accessibleLabel:void 0,children:(0,_i.jsxs)("optgroup",{label:e.optionsLabel,children:[e.defaultOption&&(0,_i.jsx)("option",{value:e.defaultOption.value,children:e.defaultOption.label}),e.sortOptions&&y()(t=e.sortOptions).call(t,(function(e,t){return(0,_i.jsx)("option",{value:e.value,children:e.label},e.label+"-"+t)}))]})}),e.showCaretIcon&&(0,_i.jsx)(cl,{circleStrokeSize:"0"})]})};kh.defaultProps={className:"pr-rd-sort-group",id:"pr-rd-sort-by",optionsLabel:"Sort Reviews By",showCaretIcon:!1};var Nh=kh,Rh=function(e){var t=e.localizations,r=e.onSortChange,n=e.reviewedByText,i=e.sortOptions,o=e.disableHeadings,a=e.nativeFilter,s=(0,fo.ZP)("review_display.4.0.sorting.dropdown_aria_label",t);return(0,_i.jsxs)("header",{id:"pr-rd-main-header",className:"pr-rd-main-header",children:[(0,_i.jsx)(Zi.X6,{importance:1,shouldUseSpan:o,className:"pr-rd-review-total",children:n}),(0,_i.jsxs)("div",{className:"pr-rd-right",children:[(0,_i.jsx)(Nh,{id:"pr-rd-sort-by",className:"pr-rd-sort-group",optionsLabel:s,accessibleLabel:s,onSortChange:r,sortOptions:i,showCaretIcon:!1}),a]})]})},Ph=function(e){var t=e.reviewedByText,r=e.disableHeadings,n=e.search,i=e.sortAndVariant,o=e.activeFilters,a=e.noResults;return(0,_i.jsxs)("header",{id:"pr-rd-main-header",className:"pr-rd-main-header pr-rd-main-header-with-filters",children:[(0,_i.jsxs)("div",{className:"pr-rd-review-header-contents",children:[(0,_i.jsx)(Zi.X6,{importance:1,shouldUseSpan:r,className:"pr-rd-review-total",children:t}),n]}),i,o,a]})},Th=r(11052),Ah=r.n(Th);function Lh(e){return"object"==typeof e&&null!=e&&1===e.nodeType}function Oh(e,t){return(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e}function Dh(e,t){if(e.clientHeightt||o>e&&a=t&&s>=r?o-e-n:a>t&&sr?a-t+i:0}var Fh=function(e,t){var r;return b()(r=t.split(".")).call(r,(function(e,t){return function(e,t){return!!e&&t in e}(e,t)?e[t]:null}),e)},zh=xe.forwardRef((function(e,t){var r,n,i=e.config,o=e.merchantProperties,a=e.localizations,s=e.msqs,l=e.onFilterChange,c=e.search,u=e.sortAndVariant,d=e.noResults,p=e.reviewedByText,f=e.activeFilters,h=e.filters,v=e.onResetFilters,g=e.totalReviews,_=(0,xe.useRef)(),w=(0,xe.useState)(!1),b=w[0],x=w[1],E=Xu("(max-width: 680px)"),S=(0,xe.useRef)((0,Ms.x)()),C=(0,xe.useState)(h),j=C[0],I=C[1],k="SIMPLE"===(0,Se.$)("REVIEW_DISPLAY_SNAPSHOT_TYPE",o,i),N=y()(r=m()(n=m()(s).call(s,(function(e){return"tag"===e.type}))).call(n,(function(e){return k||"pros"!==e.key&&"cons"!==e.key}))).call(r,(function(e){var t,r=y()(t=gn()(e)).call(t,(function(e){var t=e.label;return{id:t,label:t+" ("+e.count+")"}})),n=m()(h).call(h,(function(t){return t.attribute===e.key}));return(0,_i.jsx)(Hh,{id:e.key,label:e.name,options:r,icons:Fh(i,"customizations.msq_icons."+[e.key]),buttonAriaLabel:(0,zl.W)((0,fo.ZP)("review_display.4.0.filtering.dropdown.apply_filter",a),e.name),handleSelect:function(e,t){return l(e,t)},itemsSelected:n,localizations:a},e.key+"-"+S.current)}));return(0,_i.jsxs)("header",{ref:_,id:"pr-rd-main-header",className:vo()("pr-rd-main-header",{"pr-rd-main-header-with-filters":!0,"pr-header-filters":!0,"pr-header-filters--mobile":E}),children:[(0,_i.jsx)(Zi.X6,{importance:2,className:"pr-rd-review-total pr-headers-filters__reviews-headline",children:p}),(0,_i.jsxs)("div",{className:"pr-rd-main-header__utility-bar pr-header-filters__utility-bar",children:[(0,_i.jsx)("div",{className:"pr-rd-main-header__search pr-header-filters__search",children:c}),(0,_i.jsxs)("div",{className:"pr-rd-review-header",children:[!!N.length&&(0,_i.jsx)("div",{className:"pr-rd-review-header__accordion",children:(0,_i.jsxs)("div",{className:"pr-rd-review-header__accordion-title",onClick:function(){return x((function(e){return!e}))},"data-testid":"filters-dropdown",children:[h.length>0&&(0,_i.jsx)("span",{className:"pr-rd-review-header__accordion-title__count","aria-label":qh(h.length,a),children:h.length}),(0,_i.jsx)("span",{className:"pr-rd-review-header__accordion-title__text",children:(0,fo.ZP)("review_display.4.0.filtering.dropdown_v2.dropdown.label",a)}),(0,_i.jsx)(cl,{circleOutline:!1})]})}),(0,_i.jsx)("div",{className:"pr-rd-main-header__sort",children:u})]})]}),!!N.length&&(0,_i.jsxs)("div",{className:vo()("pr-rd-review-header-contents pr-rd-review-header-contents__content",{"pr-rd-review-header-contents--opened":b}),children:[E&&(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsxs)("div",{className:"pr-filters__fixed-header",children:[(0,_i.jsxs)(Zi.y5,{children:[(0,_i.jsx)(Zi.X6,{importance:3,className:"pr-filters__title",children:(0,fo.ZP)("review_display.4.0.filtering.dropdown_v2.dropdown.label",a)}),(0,_i.jsx)("div",{className:"pr-filter-total",children:(0,zl.W)((0,fo.ZP)("review_display.4.0.search.results_heading",a),g)})]}),(0,_i.jsx)("button",{onClick:function(){l("clearFilters","clearFilters")},className:"pr-filters__clear-button",children:(0,fo.ZP)("review_display.4.0.filtering.dropdown_v2.mobile_modal.clear_filters",a)})]}),(0,_i.jsxs)("div",{className:"pr-filters__menu",children:[(0,_i.jsx)("button",{onClick:function(){return v(j),void x(!1)},className:"pr-filters__back-btn pr-accessible-btn",children:(0,fo.ZP)("review_display.4.0.filtering.dropdown_v2.mobile_modal.cancel_filters",a)}),(0,_i.jsx)("button",{onClick:function(){return I(h),void x(!1)},className:"pr-filters__apply-btn pr-accessible-btn",children:(0,fo.ZP)("review_display.4.0.filtering.dropdown_v2.mobile_modal.submit_filters",a)})]})]}),(0,_i.jsx)("div",{className:"pr-multiselect-wrapper",children:N})]}),f,d]})})),Vh=zh;function qh(e,t){return 1===e?(0,fo.ZP)("review_display.4.0.filtering.dropdown.active_filters_label_singular",t):e>1?(0,zl.W)((0,fo.ZP)("review_display.4.0.filtering.dropdown.active_filters_label_plural",t),e):""}var Wh=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a-1&&(s=function(){return r.onOptionClick(o[i])})}(a||s)&&(e.preventDefault(),a&&r.setState(a),s&&s())}})),po()(co()(r),"onOptionMousemove",(function(e){r.shouldScroll=!1,r.setState({highlightedIndex:e})})),po()(co()(r),"onOptionClick",(function(e){if(!1===r.isControlled()){var t,n,i=r.state.itemsSelected,a=Ah()(i).call(i,(function(t){return t.value===e.id}));if(a)t=m()(i).call(i,(function(e){return e!==a}));else t=o()(n=[]).call(n,i,[{attribute:r.props.id,value:e.id}]);r.setState({itemsSelected:t})}r.props.handleSelect&&r.props.handleSelect(r.props.id,e.id)})),r}vi()(t,e);var r=t.prototype;return r.componentDidMount=function(){document.addEventListener("mousedown",this.onMouseDown),document.addEventListener("mouseup",this.onMouseUp),document.addEventListener("touchstart",this.onTouchStart),document.addEventListener("touchmove",this.onTouchMove),document.addEventListener("touchend",this.onTouchEnd)},r.componentDidUpdate=function(e,t){!1===t.isOpen&&!0===this.state.isOpen&&(this.menuRef.current&&this.menuRef.current.focus(),this.setState({highlightedIndex:0})),t.highlightedIndex!==this.state.highlightedIndex&&this.state.isOpen&&this.state.highlightedIndex>=0&&(!1===this.shouldScroll?this.shouldScroll=!0:function(e,t){if(null===e)return;(function(e,t){var r=window,n=t.scrollMode,i=t.block,o=t.inline,a=t.boundary,s=t.skipOverflowHiddenElements,l="function"==typeof a?a:function(e){return e!==a};if(!Lh(e))throw new TypeError("Invalid target");for(var c=document.scrollingElement||document.documentElement,u=[],d=e;Lh(d)&&l(d);){if((d=d.parentElement)===c){u.push(d);break}null!=d&&d===document.body&&Dh(d)&&!Dh(document.documentElement)||null!=d&&Dh(d,s)&&u.push(d)}for(var p=r.visualViewport?r.visualViewport.width:innerWidth,f=r.visualViewport?r.visualViewport.height:innerHeight,h=window.scrollX||pageXOffset,m=window.scrollY||pageYOffset,v=e.getBoundingClientRect(),g=v.height,_=v.width,y=v.top,w=v.right,b=v.bottom,x=v.left,E="start"===i||"nearest"===i?y:"end"===i?b:y+g/2,S="center"===o?x+_/2:"end"===o?w:x,C=[],j=0;j=0&&x>=0&&b<=f&&w<=p&&y>=P&&b<=A&&x>=L&&w<=T)return C;var O=getComputedStyle(I),D=parseInt(O.borderLeftWidth,10),M=parseInt(O.borderTopWidth,10),F=parseInt(O.borderRightWidth,10),z=parseInt(O.borderBottomWidth,10),V=0,q=0,W="offsetWidth"in I?I.offsetWidth-I.clientWidth-D-F:0,U="offsetHeight"in I?I.offsetHeight-I.clientHeight-M-z:0;if(c===I)V="start"===i?E:"end"===i?E-f:"nearest"===i?Mh(m,m+f,f,M,z,m+E,m+E+g,g):E-f/2,q="start"===o?S:"center"===o?S-p/2:"end"===o?S-p:Mh(h,h+p,p,D,F,h+S,h+S+_,_),V=Math.max(0,V+m),q=Math.max(0,q+h);else{V="start"===i?E-P-M:"end"===i?E-A+z+U:"nearest"===i?Mh(P,A,N,M,z+U,E,E+g,g):E-(P+N/2)+U/2,q="start"===o?S-L-D:"center"===o?S-(L+R/2)+W/2:"end"===o?S-T+F+W:Mh(L,T,R,D,F+W,S,S+_,_);var Z=I.scrollLeft,B=I.scrollTop;E+=B-(V=Math.max(0,Math.min(B+V,I.scrollHeight-N+U))),S+=Z-(q=Math.max(0,Math.min(Z+q,I.scrollWidth-R+W)))}C.push({el:I,top:V,left:q})}return C})(e,{boundary:t,block:"nearest",scrollMode:"if-needed"}).forEach((function(e){var t=e.el,r=e.top,n=e.left;t.scrollTop=r,t.scrollLeft=n}))}(this.highlightedItemRef,this.menuRef));var r=this.isControlled()?[e.itemsSelected,this.props.itemsSelected]:[t.itemsSelected,this.state.itemsSelected],n=r[1];r[0].lenght>0&&0===n.length&&this.setState({isOpen:!1})},r.componentWillUnmount=function(){document.removeEventListener("mousedown",this.onMouseDown),document.removeEventListener("mouseup",this.onMouseUp),document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd)},r.isControlled=function(){return void 0!==this.props.itemsSelected},r.render=function(){var e,t=this,r=this.state,n=r.isOpen,i=r.highlightedIndex,o=this.props,a=o.localizations,s=o.icons,l=this.getItemsSelected(),c=l.length,u=this.itemId+"-label",p=this.itemId+"-selected-count",f=b()(l).call(l,(function(e,t){return e.add(t.value),e}),new(Ci()));return(0,_i.jsxs)("div",{className:"pr-multiselect pr-multiselect-button-"+this.props.id,children:[(0,_i.jsxs)("button",{type:"button",onClick:this.toggleMenu,className:"pr-multiselect-button","aria-expanded":n?"true":void 0,"aria-labelledby":u+" "+p,"aria-haspopup":"listbox",ref:this.toggleButtonRef,onKeyDown:this.onToggleButtonKeyDown,children:[c>0&&(0,_i.jsx)("span",{className:"pr-multiselect-count","aria-hidden":"true",children:c}),(0,_i.jsx)("span",{className:"pr-multiselect-button-label","aria-hidden":"true",children:this.props.label}),(0,_i.jsx)("span",{className:"pr-accessible-text",id:u,children:this.props.buttonAriaLabel}),(0,_i.jsx)("span",{className:"pr-accessible-text",id:p,children:qh(c,a)}),(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"4"})]}),(0,_i.jsx)("ul",{className:"pr-multiselect-options",style:{display:this.state.isOpen?"block":"none"},ref:this.menuRef,tabIndex:"-1",role:"listbox",onMouseLeave:function(e){t.setState({highlightedIndex:-1})},onKeyDown:this.onMenuKeyDown,"aria-activedescendant":i>-1?this.itemId+"-"+i:void 0,"aria-labelledby":u,children:y()(e=this.props.options).call(e,(function(e,r){var n=f.has(e.id),o=r===i,a=t.itemId+"-"+r,l={id:a,key:a,isSelected:n,label:e.label,isHighlighted:o,ref:function(e){o&&(t.highlightedItemRef=e)},onMouseMove:function(){t.onOptionMousemove(r)},onClick:function(){t.onOptionClick(e)}},c=Uh;return s&&s.hasOwnProperty(e.id)&&(c=Zh,l.icon=s[e.id]),(0,_i.jsx)(c,d()({},l))}))})]})},t}(xe.Component),Uh=xe.forwardRef((function(e,t){var r=e.id,n=e.label,i=e.isHighlighted,o=e.isSelected,a=e.onMouseMove,s=e.onClick;return(0,_i.jsxs)("li",{id:r,className:vo()({"pr-multiselect-item":!0,"pr-multiselect-item--highlight":i}),ref:t,onMouseMove:a,onClick:function(e){e.preventDefault(),e.stopPropagation(),s()},role:"option","aria-selected":o,children:[(0,_i.jsx)("input",{id:r+"-input",checked:o,readOnly:!0,type:"checkbox","aria-hidden":"true",tabIndex:"-1"}),(0,_i.jsx)("label",{htmlFor:r+"-input",className:"pr-multiselect-item-label",children:n})]})})),Zh=xe.forwardRef((function(e,t){var r=e.id,n=e.label,i=e.isHighlighted,o=e.isSelected,a=e.onMouseMove,s=e.onClick,l=e.icon;return(0,_i.jsxs)("li",{id:r,className:vo()({"pr-multiselect-item":!0,"pr-multiselect-item--w-icon":!0,"pr-multiselect-item--highlight":i}),ref:t,onMouseMove:a,onClick:function(e){e.preventDefault(),e.stopPropagation(),s()},role:"option","aria-selected":o,children:[(0,_i.jsx)("input",{id:r+"-input",checked:o,readOnly:!0,type:"checkbox","aria-hidden":"true",tabIndex:"-1",className:"pr-multiselect-item-with-icon-input"}),(0,_i.jsx)("img",{alt:"",src:l,"aria-hidden":"true",className:"pr-multiselect-item-icon"}),(0,_i.jsx)("label",{htmlFor:r+"-input",className:"pr-multiselect-item-label",children:n})]})}));function Bh(e,t){return e===t||e.contains&&e.contains(t)}var Hh=Wh,Kh=r(20400),Gh=function(e){var t,r,n=e.config,i=e.merchantProperties,o=e.localizations,a=e.msqs,s=e.onFilterChange,l=e.search,c=e.sortAndVariant,u=e.noResults,d=e.reviewedByText,p=e.activeFilters,f=e.filters,h="SIMPLE"===(0,Se.$)("REVIEW_DISPLAY_SNAPSHOT_TYPE",i,n),v=y()(t=m()(r=m()(a).call(a,(function(e){return"tag"===e.type}))).call(r,(function(e){return h||"pros"!==e.key&&"cons"!==e.key}))).call(t,(function(e){var t,r=y()(t=gn()(e)).call(t,(function(e){var t=e.label;return{id:t,label:t+" ("+e.count+")"}})),n=m()(f).call(f,(function(t){return t.attribute===e.key}));return(0,_i.jsx)(Hh,{id:e.key,label:e.name,options:r,buttonAriaLabel:(0,zl.W)((0,fo.Ip)("review_display.4.0.filtering.dropdown.apply_filter",o),e.name),selectedFiltersAriaLabel:function(e){return 1===e?(0,fo.Ip)("review_display.4.0.filtering.dropdown.active_filters_label_singular",o):e>1?(0,fo.Ip)("review_display.4.0.filtering.dropdown.active_filters_label_plural",o).replace("{}",e):""},handleSelect:function(e,t){return s(e,t)},itemsSelected:n,localizations:o},e.key)}));return(0,_i.jsxs)("header",{id:"pr-rd-main-header",className:"pr-rd-main-header pr-rd-main-header-with-filters",children:[!!v.length&&(0,_i.jsx)("div",{className:"pr-rd-review-header-contents",children:v}),(0,_i.jsx)("div",{className:"pr-clearfix"}),(0,_i.jsxs)("div",{className:"pr-rd-main-header-search-sort",children:[(0,_i.jsx)("div",{className:"pr-rd-main-header-search",children:l}),c]}),(0,_i.jsx)(Kh.Z,{importance:2,className:"pr-rd-review-total",children:d}),(0,_i.jsx)("div",{children:p}),u]})};function Qh(){var e=(0,xe.useState)(!0),t=e[0],r=e[1];return(0,xe.useEffect)((function(){var e=setTimeout((function(){r(!1)}),500);return function(){return clearTimeout(e)}})),t?(0,_i.jsx)("span",{className:"sr-only",children:" "}):null}var Yh,$h,Xh,Jh,em,tm,rm=function(e){for(var t=e.filters,r=e.localizations,n=e.onFilterChange,i=e.disableHeadings,o=e.merchantProperties,a=e.config,s=xe.useRef(null),l=[],c=[],u=m()(t).call(t,(function(e){return"variant"!==e.attribute&&"native_only"!==e.attribute})),d=function(e){var i=t[e],o=i.attribute,a=i.value,d="rating"===o?(0,fo.ZP)(0===a?"review_display.4.0.stars_singular":"review_display.4.0.stars_plural",r).replace("{0}",a):a,p=o+"-"+a;c.push(p),l.push((0,_i.jsxs)(Pf,{className:"pr-filter-btn__close",ariaLabel:"Remove "+d+" filter",onClick:function(){return n(o,a)},buttonKey:"number"==typeof a?(0,fo.ZP)("review_display.4.0.stars_plural",r).replace("{0}",a):a,theme:"button",ref:function(t){e+1===u.length&&(s.current=t)},children:[(0,_i.jsx)("span",{className:"pr-filter-btn__child pr-filter-btn__icon",children:(0,_i.jsx)(Is,{})}),(0,_i.jsx)("span",{className:"pr-filter-btn__child pr-filter-btn__buttonText",children:d})]},p))},p=0;p0,g=(0,Se.v)(o,a),_=g.FILTER_SCROLLING_ENABLED,y=g.REVIEW_FILTERING_TYPE,w=c.length=1.2?(0,_i.jsxs)("div",{className:vo()("pr-rd-search-reviews-input-flex",{"pr-rd-search-reviews-input--mobile":f<=350}),children:[(0,_i.jsxs)("div",{className:"pr-rd-search-reviews-input-field",children:[(0,_i.jsx)(gp,{"aria-hidden":"true"}),g]}),(0,_i.jsx)("button",{type:"button","aria-label":v(Jh||(Jh=qu()(["button.text"]))),onClick:function(){return o(u)},className:vo()("pr-rd-search-reviews-icon-button",{"pr-rd-search-filled":u.length,"pr-rd-search-reviews-icon-button--mobile":f<=350}),children:v(em||(em=qu()(["button.text"])))})]}):(0,_i.jsxs)("div",{className:"pr-rd-search-reviews-input",children:[g,(0,_i.jsx)("button",{type:"button","aria-label":v(tm||(tm=qu()(["button.text"]))),onClick:function(){l(!0),o(u).then((function(){l(!1)}))},className:vo()("pr-rd-search-reviews-icon-button",{"pr-rd-search-filled":u.length}),children:s?(0,_i.jsx)(fl.Z,{"aria-hidden":"true",isVisible:!0}):(0,_i.jsx)(gp,{"aria-hidden":"true",invert:!0})})]}),(0,_i.jsx)("section",{className:"pr-rd-search-container",children:m})},im=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.totalReviews,a=e.rollup,s=e.sorts,l=e.sortAndFilter,c=e.initialNativeFilter,u=e.features,p=e.reviews,f=e.onClearSearch,h=e.ratingWithNoReviewsActiveFilterValue,v=(0,Se.v)(r,t),g=v.PAGE_ID,_=v.ENABLE_REVIEW_FILTERING,w=v.REVIEW_FILTERING_TYPE,b=v.DISABLE_CD4_HEADING_STRUCTURES,x=v.B2C_NATIVE_CONTENT_FILTER,E=(0,bi.dZ)(g,ul.yW),S=(0,xe.useState)(e.filters),C=S[0],j=S[1],I=(0,xe.useRef)();(0,xe.useEffect)((function(){j(e.filters)}),[e.filters]),(0,xe.useEffect)((function(){var e;"number"==typeof h&&(null==I||null===(e=I.current)||void 0===e||e.focus())}),[h]),(0,xe.useEffect)((function(){x&&j((function(e){var t;return o()(t=[]).call(t,e,[{attribute:"native_only",value:c?"true":"false"}])}))}),[c,x]);var k="string"==typeof _?"1"===_:_,N=k?"DROPDOWNS"===w?Gh:Ph:Rh;"DROPDOWNS_V2"===w&&(N=Vh);var R="DROPDOWNS_V2"===w?0!==C.length?1===i?(0,fo.ZP)("review_display.4.0.filtering.reviews_relevant_to_filters_singular",n):0===i?(0,fo.ZP)("review_display.4.0.filtering.no_reviews_relevant_to_filters",n):(0,fo.ZP)("review_display.4.0.filtering.reviews_relevant_to_filters_plural",n):(0,fo.ZP)("review_display.4.0.common.read_all_reviews",n):0===C.length?1===i?(0,fo.ZP)("review_display.4.0.common.reviewed_by_singular",n):(0,fo.ZP)("review_display.4.0.common.reviewed_by_plural",n):(0,fo.ZP)("review_display.4.0.search.results_heading",n),P="number"==typeof h?(0,_i.jsxs)("div",{ref:I,tabIndex:"-1",children:[(0,Jo.WU)((0,fo.ZP)("review_display.4.0.rating_only.heading.no_reviews",n),h),(0,_i.jsx)("span",{className:"pr-rd-review-results-subheading",children:(0,fo.ZP)("review_display.4.0.rating_only.subheading.no_reviews",n)})]}):(0,Jo.WU)(R,i),T=(0,Jo.D9)(P);(0,xe.useEffect)((function(){T===P||h||(0,Jo.ub)(P)}));var A,L,O,D,M,F=function(e,t,r){var n,i=t.ALLOW_CUSTOMER_IMAGES||t.ALLOW_CUSTOMER_VIDEOS,a=(0,fo.ZP)("review_display.4.0.sorting.most_recent_label",e),s=(0,fo.ZP)("review_display.4.0.sorting.oldest_label",e),l=(0,fo.ZP)("review_display.4.0.sorting.highest_rated_label",e),c=(0,fo.ZP)("review_display.4.0.sorting.lowest_rated_label",e),u=(0,fo.ZP)("review_display.4.0.sorting.most_helpful_label",e),d=(0,fo.ZP)("review_display.4.0.sorting.sort_by_images_label",e),p=(0,fo.ZP)("review_display.4.0.sorting.sort_by_native_language_label",e),f=(0,Se.v)(t,r).DEFAULT_REVIEW_SORT_ORDER;f=f?f.toLowerCase():"newest";var h=[{label:a,value:"newest"},{label:u,value:"mosthelpful"},{label:c,value:"lowestrating"},{label:l,value:"highestrating"},{label:s,value:"oldest"}];(0,El.s)(r.locale,t)&&h.push({label:p,value:"language"}),i&&h.push({label:d,value:"mediasort"});var v=m()(h).call(h,(function(e){return e.value===f})),g=m()(h).call(h,(function(e){return e.value!==f}));return o()(n=[]).call(n,v,g)}(n,r,t),z=function(e){return E(gr.Z[e].sm),l(t,[gr.Z[e].apiText],C)},V=function(e,r){var n=m()(C).call(C,(function(t){return t.attribute!==e||t.value!==r}));return"clearFilters"===e&&"clearFilters"===r?l(t,s,[]):(n.length===C.length?(E(bi.GM.REVIEW_DISPLAY_MSQ_FILTER_APPLIED.replace("{value}",r)),n.push({attribute:e,value:r})):E(bi.GM.REVIEW_DISPLAY_MSQ_FILTER_REMOVED.replace("{value}",r)),l(t,s,n))},q=xe.useCallback((function(e){var r=m()(C).call(C,(function(e){return"search"!==e.attribute}));return e.length&&(r.push({attribute:"search",value:e}),E(bi.GM.REVIEW_DISPLAY_SEARCH_ANSWERS(e))),l(t,s,r)}),[t,C,E,l,s]),W=function(e){var r=m()(C).call(C,(function(e){return"variant"!==e.attribute}));return"clearVariantFilters"!==e&&r.push({attribute:"variant",value:e}),l(t,s,r)},U=function(e){var r=m()(C).call(C,(function(e){return"native_only"!==e.attribute}));return r.push({attribute:"native_only",value:e}),l(t,s,r)},Z=function(){if(!r.B2C_NATIVE_CONTENT_FILTER)return null;var e=(0,fo.ZP)("review_display.4.0.filtering.filter_by_source.label",n),t=[{label:(0,fo.ZP)("review_display.4.0.filtering.filter_by_source.all_reviews",n),value:"false"},{label:(0,fo.ZP)("review_display.4.0.filtering.filter_by_source.native_reviews",n),value:"true"}];return c&&t.reverse(),(0,_i.jsx)(Nh,{id:"pr-rd-native-sort",className:"pr-rd-sort-group",optionsLabel:e,accessibleLabel:e,onSortChange:U,sortOptions:t})};return(0,_i.jsx)(N,d()(d()({},e),{},{msqs:a.properties,onFilterChange:V,onResetFilters:function(e){l(t,s,e)},onSortChange:z,sortOptions:F,reviewedByText:P,disableHeadings:b,search:function(){var e=(0,Se.$)("locale",t);if(!(u&&u.search_supported_locales&&u.search_supported_locales.some((function(t){return t===e}))))return null;var i=!!m()(C).call(C,(function(e){return"search"===e.attribute}))[0];return(0,_i.jsx)(nm,{config:t,localizations:n,merchantProperties:r,hasSearchFilter:i,onSearchChange:q,onClearSearch:f})}(),sortAndVariant:(L=(0,fo.ZP)("review_display.4.0.sorting.dropdown_aria_label",n),O=(0,fo.ZP)("review_display.4.0.filtering.all_variants",n),D=(0,fo.ZP)("review_display.4.0.filtering.filter_by_variant",n),M=vo()("pr-rd-review-header-sorts",{"pr-rd-main-header-sorts-w-search":"DROPDOWNS"===w}),k?(0,_i.jsxs)("div",{className:M,children:[Z(),(0,_i.jsx)(Nh,{id:"pr-rd-sort-by",className:"pr-rd-sort-group",optionsLabel:L,accessibleLabel:L,onSortChange:z,sortOptions:F,showCaretIcon:"DROPDOWNS_V2"===w}),a.variant_names&&(0,_i.jsx)(Nh,{id:"pr-rd-filter-variant-by",className:"pr-rd-sort-group",optionsLabel:D,accessibleLabel:D,onSortChange:W,defaultOption:{label:O,value:"clearVariantFilters"},sortOptions:y()(A=a.variant_names).call(A,(function(e){return{label:e,value:e}}))})]}):null),nativeFilter:Z(),activeFilters:(0,_i.jsx)(rm,{filters:C,config:t,localizations:n,merchantProperties:r,disableHeadings:b,onFilterChange:V}),noResults:(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)("span",{"aria-live":"polite","aria-atomic":"true",className:"pr-accessible-text",children:p.length?"":(0,fo.ZP)("review_display.4.0.search.no_results.header",n)}),p.length?null:(0,_i.jsxs)("div",{children:[(0,_i.jsx)("div",{className:"pr-clearfix"}),(0,_i.jsx)("div",{className:"pr-rd-display-search-no-results",children:(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:2,shouldUseSpan:b,className:"pr-rd-review-total pr-rd-no-results-msg",children:(0,fo.ZP)("review_display.4.0.search.no_results.header",n)})})})]})]})}))},om=function(e){var t=e.config,r=e.merchantProperties,n=e.localizations,i=e.currentPage,o=e.totalPages,a=e.pageSize,s=e.totalReviews,l=e.onShowNext,c=e.onShowPrevious,u=e.onBackToTop,d=(0,Se.v)(r,t).REVIEW_DISPLAY_PAGINATION_TYPE,p=1===i,f=i===o,h=(0,fo.ZP)("review_display.4.0.pagination.back_to_top",n);if("VERTICAL"===d){var m=(0,fo.ZP)("review_display.4.0.pagination.show_more_reviews",n);return(0,_i.jsx)("footer",{className:"pr-rd-main-footer pr-rd-main-footer-vertical-pagination",children:(0,_i.jsxs)("div",{className:"pr-rd-content-block",children:[(0,_i.jsx)("aside",{className:"pr-rd-pagination",children:!f&&(0,_i.jsxs)("button",{type:"button",className:"pr-rd-show-more pr-btn pr-btn-default","aria-label":m,onClick:l,children:[(0,_i.jsx)(Is,{circleOutline:!1,lineStrokeSize:"3"}),m]})}),(0,_i.jsxs)("button",{type:"button",className:"pr-rd-to-top pr-btn pr-btn-default","aria-label":h,onClick:u,onKeyDown:u,children:[h,(0,_i.jsx)(cl,{circleOutline:!1,lineStrokeSize:"4"})]})]})})}var v=a>1&&s>1?(0,fo.ZP)("review_display.4.0.pagination.displaying_reviews_plural",n):(0,fo.ZP)("review_display.4.0.pagination.displaying_review_singular",n),g=(0,fo.ZP)("review_display.4.0.pagination.previous",n),_=(0,fo.ZP)("review_display.4.0.pagination.next",n),y=(i-1)*a+1+"-"+Math.min(i*a,s);return(0,_i.jsx)("footer",{className:"pr-rd-main-footer",children:(0,_i.jsxs)("div",{className:"pr-rd-content-block",children:[(0,_i.jsxs)("p",{className:"pr-rd-review-position",children:[(0,_i.jsx)("span",{children:v+" "}),(0,_i.jsx)("span",{className:"pr-rd-bold",children:y})]}),(0,_i.jsx)("a",{href:"#",className:"pr-rd-to-top pr-underline","aria-label":h,onClick:u,onKeyDown:u,children:h}),(0,_i.jsxs)("div",{className:"pr-rd-pagination",children:[!p&&(0,_i.jsxs)("a",{href:Cl(window.location.href,i-1),className:"pr-rd-pagination-btn",onClick:c,children:[(0,_i.jsx)("span",{"aria-hidden":"true",children:"« "}),g]}),!p&&!f&&(0,_i.jsx)("span",{"aria-hidden":"true",children:"|"}),!f&&(0,_i.jsxs)("a",{href:Cl(window.location.href,i+1),className:"pr-rd-pagination-btn",onClick:l,children:[_,(0,_i.jsx)("span",{"aria-hidden":"true",children:" »"})]})]})]})})},am=function(e){var t=e.config,r=e.merchantProperties,n=e.reviews,i=e.productKey,o=e.productName,a=e.averageRating,s=e.reviewCount,l=(0,Bt.x9)(t,r),c=l.showJSONLD,u=l.useNestedJSONLD,p=(0,xe.useState)((function(){var e=document.createElement("div");return e.className="p-w-r",e.setAttribute("data-pr-component","json+ld"),e}))[0];(0,xe.useEffect)((function(){return document.body&&document.body.appendChild(p),function(){return p.remove()}}),[p]);var f=function(e){return(0,Ee.createPortal)(e,p)};if(!c)return null;var h,m=(0,Se.v)(t).SUBJECT;return!0===u?(m=m&&"Product"===(null===(h=m)||void 0===h?void 0:h["@type"])?m:void 0,0===n.length&&null==m?null:0===n.length?f((0,_i.jsx)(Xo,{children:(0,_i.jsx)(Mo,d()({name:o||i,id:i},m))})):f((0,_i.jsx)(Xo,{children:(0,_i.jsxs)(Mo,d()(d()({name:o||i,id:i},m),{},{children:[(0,_i.jsx)(No,{ratingValue:a,reviewCount:s}),(0,_i.jsx)(Ao,{type:"review",children:y()(n).call(n,(function(e){return(0,_i.jsxs)(qo,{name:e.details.headline,reviewBody:e.details.comments,datePublished:new Date(e.details.created_date).toISOString(),children:[(0,_i.jsx)(Po,{name:e.details.nickname}),(0,_i.jsx)(Oo,{name:e.details.location}),(0,_i.jsx)(zo,{ratingValue:e.metrics.rating})]},e.review_id)}))})]}))}))):0===n.length?null:f((0,_i.jsx)(Xo,{children:(0,_i.jsx)(Qo,{children:y()(n).call(n,(function(e){return(0,_i.jsxs)(qo,{name:e.details.headline,reviewBody:e.details.comments,datePublished:new Date(e.details.created_date).toISOString(),children:[(0,_i.jsx)(Po,{name:e.details.nickname}),(0,_i.jsx)(Oo,{name:e.details.location}),(0,_i.jsx)(zo,{ratingValue:e.metrics.rating}),(0,_i.jsx)(Uo,{children:(0,_i.jsx)(Mo,{name:o,parentID:t.structured_data_product_id||i})})]},e.review_id)}))})}))},sm=am=xe.memo(am);var lm=function(e){var t=e.config,r=e.localizations,n=e.reviewId,i=e.handleClose,o=e.review,a=e.merchantProperties,s=e.fetchSingleReview,l=(0,fo.ZP)("review_display.4.0.spotlight_review.heading",r),c=(0,xe.useState)(o),u=c[0],p=c[1],f=(0,xe.useState)(!1),h=f[0],m=f[1],v=(0,xe.useState)(),g=v[0],_=v[1],y=(0,xe.useState)(!1),w=y[0],b=y[1],x=(0,xe.useState)(),E=x[0],S=x[1],C=(0,xe.useState)(),j=C[0],I=C[1],k=(0,xe.useState)(),N=k[0],R=k[1],P=(0,Jo.D9)(N),T=(0,xe.useRef)();(0,xe.useEffect)((function(){var e;null!=o&&(p(o),null===(e=T.current)||void 0===e||e.focus())}),[o]),(0,xe.useEffect)((function(){var e;P!==N&&((0,Jo.ub)(N),null===(e=T.current)||void 0===e||e.focus())}),[P,N]);var A=(0,_i.jsx)(Wc,{config:t,review:u,localizations:r,merchantProperties:a,singleReviewID:Number(n),openFlaggingForm:function(){R((0,fo.ZP)("review_display.4.0.flagging_form.heading",r)),m(!0)},isFlagging:h,flaggedContent:g,openOriginalReview:function(){var e=(0,fo.ZP)("review_display.4.0.spotlight_review.original_review.heading",r);if(Array.isArray(E)&&0!==E.length)return R(e),void b(!0);s(u.details.old_ugc_id).then((function(t){Array.isArray(t.results)&&0!==t.results.length&&(S(d()(d()({},t.results[0]),{},{isVisible:!0})),R(e),b(!0))}))},openMediaCard:function(e,t){I(d()(d()({},e[t]),{},{review_id:n})),R((0,fo.ZP)("review_display.4.0.media_card.heading",r))},forwardedRef:T,topContent:(0,_i.jsxs)("div",{className:"pr-spotlight-review_heading",children:[(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(Zi.X6,{importance:1,className:"pr-spotlight-review_headline",id:"SpotlightReview",children:l})}),(0,_i.jsx)("div",{className:"pr-spotlight-review_subscript",children:"By PowerReviews"})]})});return w&&(A=(0,_i.jsx)(Wc,{config:t,review:E,localizations:r,merchantProperties:a,singleReviewID:u.details.old_ugc_id,showMedia:!1,showFlaggingAndHelpfulVoting:!1,forwardedRef:T,topContent:(0,_i.jsx)("button",{className:"pr-back-to-media",type:"button",onClick:function(){R(l),b(!1)},children:(0,fo.ZP)("review_display.4.0.spotlight_review.back_to_updated_review.button_label",r)})})),h&&(A=(0,_i.jsx)(rc,{localizations:r,onClose:function(){R(l),m(!1)},onSubmit:function(e){return(0,vr.Os)(d()(d()(d()({},e),t),{},{merchant_id:t.merchant_id,command:"flagugc",ugc_id:n})).then((function(){m(!1),_([Number(n)])}))}})),j&&(A=(0,_i.jsx)("div",{className:"pr-media-carousel--light",children:(0,_i.jsx)("div",{className:"carousel__body carousel__body--light",children:(0,_i.jsx)("div",{className:"slide slide__center slide--dark",children:(0,_i.jsx)(el,{className:"pr-media-card-in",media:j,readReviewId:n,localizations:r,config:t,merchantProperties:a,enableFlaggingAndVoting:!1,flaggedContent:g||[],helpfulContent:[],unhelpfulContent:[],primarySlide:!0,onReadReviewFromGallery:function(){R(l),I(null)},forwardedRef:T})})})})),(0,_i.jsx)("div",{className:"pr-spotlight-review",children:(0,_i.jsx)(Rs,{localizations:r,handleClose:i,isCard:!!h,role:"dialog","aria-labelledby":"SpotlightReview",children:A})})},cm=new(E());var um,dm,pm,fm,hm,mm,vm=r(49216),gm=r.n(vm),_m=r(20261),ym=r.n(_m);function wm(){return wm=gm()(ym().mark((function e(t,r,n){var i,o,a;return ym().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.init("/m/{merchant_id}/u/{ugc_id}/lang/{targetLanguage}/translate",{ugc_id:r,targetLanguage:n},{_noconfig:!0}),o=i.url,a=i.headers,e.next=3,fetch(o,{method:"POST",headers:a}).then(t.checkStatus).then((function(e){return e.json()}));case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}}),e)}))),wm.apply(this,arguments)}function bm(e){var t=e.onClick,r=e.l,n=e.record,i=e.onLangChange,o=(0,xe.useRef)(),a=(0,Jo.D9)(n);return(0,xe.useEffect)((function(){if(a!==n&&null!=n){var e,t;if("fulfilled"===n.status)i(),null===(e=o.current)||void 0===e||e.focus();if("error"===n.status)null===(t=o.current)||void 0===t||t.focus()}var r;null!=a&&null==n&&(i(),null===(r=o.current)||void 0===r||r.focus())}),[a,n,i]),(0,_i.jsx)("div",{"aria-live":"polite",children:(0,_i.jsx)("div",{className:"pr-review-translation",children:null==n?(0,_i.jsx)("button",{className:"pr-review-translation__btn",onClick:t,ref:o,children:r(um||(um=qu()(["review_display.4.0.translation.translate_button"])))}):"pending"===n.status?(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)("div",{className:"pr-review-translation__loading-text","aria-hidden":"true",children:r(dm||(dm=qu()(["review_display.4.0.translation.loading_text"])))}),(0,_i.jsx)("div",{className:"pr-accessible-text",children:r(pm||(pm=qu()(["review_display.4.0.translation.loading_aria_text"])))})]}):"rejected"===n.status?(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)("div",{className:"pr-review-translation__error-text",children:r(fm||(fm=qu()(["review_display.4.0.translation.error_text"])))}),(0,_i.jsx)("button",{className:"pr-review-translation__btn",onClick:t,ref:o,children:r(hm||(hm=qu()(["review_display.4.0.translation.translate_retry"])))})]}):"fulfilled"===n.status?(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)("div",{className:"pr-review-translation__arrow",children:(0,_i.jsx)(xm,{})}),(0,_i.jsx)("button",{className:"pr-review-translation__btn",onClick:t,ref:o,children:r(mm||(mm=qu()(["review_display.4.0.translation.revert_button"])))})]}):void 0})})}function xm(){return(0,_i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,_i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M7 16l-4-4m0 0l4-4m-4 4h18"})})}var Em,Sm,Cm={getReviews:Ar,sortAndFilter:Or,voteContent:Mr,flagContent:Dr,gotoNextPage:function(e,t){e=Fr(e,hi);var r=(0,Nt.iC)(e);return function(n){return t?mr(t,e).then((function(e){return n({type:Pr,productKey:r,response:e})})):new(N())((function(e){e(n({type:Rr,productKey:r}))}))}},gotoPreviousPage:function(e){e=Fr(e,hi);var t=(0,Nt.iC)(e);return{type:Nr,productKey:t}}},jm=(0,gi.$j)((function(e,t){var r,n,i,o=(0,Nt.iC)(t.config,e.Reviews.localeOverride,e.Reviews.merchantOverride),a=e.Reviews[o]||{},s=Array.isArray(a.reviews)?a.reviews:[];a&&(0,Se.$)("RD_PAGE",t.config)&&(r=a.pagesLoaded,s=a.pagesLoaded===a.totalPages?Array.isArray(a.reviews)?Ni()(n=a.reviews).call(n,a.reviews.length-(a.totalReviews-a.pageSize*(a.totalPages-1)),a.reviews.length):[]:Array.isArray(a.reviews)?Ni()(i=a.reviews).call(i,a.reviews.length-a.pageSize,a.reviews.length):[]);return d()(d()({},a),{},{productKey:o,flaggedContent:e.Reviews.flaggedContent,helpfulContent:e.Reviews.helpfulContent,unhelpfulContent:e.Reviews.unhelpfulContent,currentPage:r||a.currentPage,allReviews:s,localeOverride:e.Reviews.localeOverride,merchantOverride:e.Reviews.merchantOverride,apiKeyOverride:e.Reviews.apiKeyOverride})}),Cm)((function(e){var t=e.config,r=e.allReviews,n=e.rollup,i=void 0===n?{}:n,a=e.productKey,s=e.flaggedContent,l=e.helpfulContent,c=e.unhelpfulContent,u=e.voteContent,p=e.flagContent,f=e.currentPage,h=e.totalPages,m=e.totalReviews,v=e.pagesLoaded,g=e.nextPage,_=e.pageSize,w=e.gotoPreviousPage,x=e.gotoNextPage,E=e.localeOverride,S=e.merchantOverride,C=e.isLoading,j=e.reviewsLoaded,I=e.getReviews,k=e.filters,N=(0,xe.useContext)(Ui.E_),R=N.merchantProperties,P=N.localizations,T=N.features,A=N.displayApi;S&&P&&(P=e.localizations);var L=(0,xe.useState)(!1),O=L[0],D=L[1],M=(0,xe.useState)(!1),F=M[0],z=M[1],V=(0,xe.useRef)(new(Ci())),q=(0,xe.useRef)(new(Ci())),W=(0,Se.v)(R,t),U=W.STAR_STYLES,Z=W.REVIEW_DISPLAY_PAGINATION_TYPE,B=W.EXPERIMENTAL_RENDER_DEFER,H=W.MERCHANT_ID,K=W.LOCALE,G=W.PAGE_ID,Q=W.RD_PAGE,Y=W.SPOTLIGHT_REVIEW_ID,$=function(e){return(0,Jo.Ip)(""+e[0],P)},X=Array.isArray(k)?k.length:0,J=(0,Jo.D9)(X),ee=(0,xe.useRef)(!1),te=(0,xe.useRef)(!1),re=(0,xe.useCallback)((function(){ee.current=!0}),[]),ne=(0,bi.dZ)(),ie=(0,xe.useMemo)((function(){return"VERTICAL"===Z||Number(Q)?r:Ni()(r).call(r,(f-1)*_,f*_)}),[r,f,_,Z,Q]),oe=xe.useCallback((function(e){return(0,_r.ND)(A,{review_id:e}).then((function(e){var t;return{name:"review",results:null!==e?o()(t=[]).call(t,e):[]}}))}),[A]),ae=function(e){var t=e.reviewsLoaded,r=e.reviewId,n=e.reviews,i=e.fetchSingleReview,o=(0,xe.useState)(!0),a=o[0],s=o[1],l=(0,xe.useState)((function(){return t&&Array.isArray(n)?Ah()(n).call(n,(function(e){return e.review_id===Number(r)})):null})),c=l[0],u=l[1];return(0,xe.useEffect)((function(){if(null!=r&&t&&null==c){var e=!0,o=Ah()(n).call(n,(function(e){return e.review_id===Number(r)}));return o?u(o):i(r).then((function(t){Array.isArray(t.results)&&0!==t.results.length&&e&&u(d()(d()({},t.results[0]),{},{isVisible:!0}))})),function(){e=!1}}}),[i,r,c,t,n]),{spotlightReviewId:r,spotlightReviewData:c,spotlightReviewShown:!!c&&a,closeSpotlightReview:function(){return s(!1)}}}({reviewId:Y,reviewsLoaded:j,reviews:ie,fetchSingleReview:oe}),se=ae.spotlightReviewId,le=ae.spotlightReviewData,ce=ae.spotlightReviewShown,ue=ae.closeSpotlightReview,de=function(e){return function(e,t,r){return wm.apply(this,arguments)}(A,e,(0,or.H)(t.locale))},pe=function(e){var t=(0,xe.useState)({}),r=t[0],n=t[1],i=(0,xe.useCallback)((function(t){r[t]&&"fulfilled"===r[t].status?n((function(e){var r=d()({},e);return delete r[t],r})):cm.has(t)?n((function(e){var r;return d()(d()({},e),{},((r={})[t]=cm.get(t),r))})):(n((function(e){var r;return d()(d()({},e),{},((r={})[t]={status:"pending"},r))})),e(t).then((function(e){var r=e.results[0].translation_document,i={status:"fulfilled",payload:{translated_headline:r.translated_headline,translated_comments:r.translated_comments}};cm.set(t,i),n((function(e){var r;return d()(d()({},e),{},((r={})[t]=i,r))}))})).catch((function(e){n((function(r){var n;return d()(d()({},r),{},((n={})[t]={status:"rejected",payload:e},n))}))})))}),[e,r]);return{translations:r,onTranslate:i}}(de=xe.useCallback(de,[t.locale,A])),fe=pe.translations,he=pe.onTranslate;(0,xe.useEffect)((function(){!0===C||j||I(A,t)})),(0,xe.useEffect)((function(){if(Q&&g){var e=g.replace("paging.from="+_,"paging.from="+(Number(Q)-1)*_);x(t,e)}}),[_]),(0,xe.useEffect)((function(){j&&(ne(G,ul.yW,bi.GM.REVIEW_DISPLAY_LOAD),t.on_render&&Gc.Z.onReviewComponentRender(Kc.ZP.ReviewList,e,{review_count:i.review_count,average_rating:i.average_rating}))}),[j]);var me=i.review_count,ve=i.average_rating,ge=t.on_change,_e=t.page_id;(0,xe.useEffect)((function(){ge&&j&&Gc.Z.onReviewComponentChange(Kc.ZP.ReviewList,{config:{on_change:ge,page_id:_e}},{review_count:me,average_rating:ve,reviews:ie})}),[ie,ge,_e,me,ve,j]);var ye=(0,xe.useRef)(),we=(0,xe.useRef)();(0,xe.useEffect)((function(){if(f&&(1!==f||1!==v||Number(Q))&&te.current&&(te.current=!1,we.current)){z(!0);we.current.focus();var e=setTimeout((function(){z(!1),clearTimeout(e)}),500)}}),[f,v,Q]);var be=(0,Qi.e4)();if((0,xe.useEffect)((function(){var e=J!==X,t=J>0&&0===X;!0===ee.current&&e?ee.current=!1:ye.current&&t&&ye.current.domNode.focus()}),[J,X]),!j)return(0,_i.jsx)("div",{});var Ee=function(e){e&&e.preventDefault(),ne(G,ul.yW,bi.GM.REVIEW_DISPLAY_NEXT_PAGE),te.current=!0,x(t,f===v&&g)},Ce=function(e){if(e&&e.preventDefault(),ne(G,ul.yW,bi.GM.REVIEW_DISPLAY_PREV_PAGE),te.current=!0,Q){var r=function(e){var t=e.pageSize,r=e.currentPage;return"/m/"+e.MERCHANT_ID+"/l/"+e.LOCALE+"/product/"+e.PAGE_ID+"/reviews?paging.from="+(r-2)*t+"&paging.size="+t}({pageSize:_,currentPage:f,MERCHANT_ID:H,LOCALE:K,PAGE_ID:G});x(t,r)}else w(t)},je=function(e){if(13===e.keyCode||32===e.keyCode||"click"===e.type){e.preventDefault(),ne(G,ul.yW,bi.GM.REVIEW_DISPLAY_BACK_TO_TOP);var r=(0,Se.$)("on_back_to_top_click",t);if("function"==typeof r)return r();ye.current&&ye.current.focus()}},Ie=vo()("pr-review-display",{"pr-review-accessible":"ORANGE_ACCESSIBILITY_COMPLIANT"===U,"pr-rd-display-desktop":be>980,"pr-rd-display-tablet":be<=980&&be>780});if(!i.review_count&&!ie.length)return i.page_brand_score?null:(0,_i.jsxs)(_i.Fragment,{children:[(0,_i.jsx)(Ih,{config:t,merchantProperties:R,localizations:P,localeOverride:E,merchantOverride:S,className:Ie}),(0,_i.jsx)(sm,{config:t,merchantProperties:R,productKey:a,reviews:ie,productName:i.name})]});var ke,Ne,Re=(0,El.s)(t.locale,R),Pe=(0,or.H)(t.locale),Te=!!B&&!O;return(0,Bt.x9)(t,R).showJSONLD||(Te=!1),(0,_i.jsxs)(_i.Fragment,{children:[ce&&(0,_i.jsx)(lm,{config:t,reviewId:se,localizations:P,handleClose:ue,review:le,merchantProperties:R,fetchSingleReview:oe}),(0,_i.jsx)(Qi.BS,{as:"section",id:"pr-review-display","data-testid":"review-list",className:Ie,lang:(0,or.H)(E),onChange:function(e){!O&&e&&ie.length&&(D(!0),ne(G,ul.yW,bi.GM.REVIEW_DISPLAY_VISIBLE))},children:(ke=(0,_i.jsx)(sm,{config:t,merchantProperties:R,productKey:a,reviews:ie,productName:i.name,averageRating:i.average_rating,reviewCount:i.review_count}),Ne=(0,_i.jsx)(im,d()(d()({},e),{},{localizations:P,merchantProperties:R,features:T,reviews:ie,onClearSearch:re,ratingWithNoReviewsActiveFilterValue:e.ratingWithNoReviewsActiveFilterValue})),Te?(0,_i.jsxs)(_i.Fragment,{children:[Ne,ke]}):(0,_i.jsxs)(_i.Fragment,{children:[Ne,(0,_i.jsx)(Zi.y5,{children:y()(ie).call(ie,(function(e,r){var n,o,d=e.ugc_id,h=(0,or.H)(e.details.locale),m=fe[d],v="fulfilled"===(null==m?void 0:m.status),g=v?m.payload.translated_comments:(null==e||null===(n=e.highlights)||void 0===n||null===(o=n.details)||void 0===o?void 0:o.text)||e.details.comments,y=v?m.payload.translated_headline:e.details.headline,w=Re&&Pe!==h,x=function(e,t){e.current.has(d)||(e.current.add(d),ne(G,ul.yW,t))};return(0,_i.jsx)(Qi.BS,{onChange:function(e){e&&(x(V,bi.GM.REVIEW_DISPLAY_VISIBLE_INDIVIDUAL(d)),w&&x(q,bi.GM.REVIEW_TRANSLATE_VIEWED(d)))},disabled:F,children:function(n){var o;return(0,_i.jsx)(Dc,{ref:function(e){0===r&&(ye.current=e),"VERTICAL"===Z?r===(f-1)*_&&(we.current=e):0===r&&(we.current=e),n.current=null==e?void 0:e.domNode},headline:(0,_i.jsx)(Mc,{headline:y,rating:e.metrics.rating,reviewId:e.review_id,localizations:P,lang:h}),comments:(0,_i.jsx)(Fc,{comments:g,lang:h}),reviewTranslation:w?(0,_i.jsx)(bm,{onClick:function(){he(d),ne(G,ul.yW,v?bi.GM.REVIEW_TRANSLATE_ORIGINAL(d):bi.GM.REVIEW_TRANSLATE(d))},record:m,l:$,onLangChange:function(){return(0,Jo.ub)(y,g)}}):null,review:e,config:t,localizations:P,merchantProperties:R,sendBeacon:ne,flaggedContent:s,helpfulContent:l,unhelpfulContent:c,voteContent:u,productKey:a,flagContent:p,propertiesByKey:(null===(o=i.properties)||void 0===o?void 0:b()(o).call(o,(function(e,t){return e[t.key]=t,e}),{}))||{}})}},e.ugc_id)}))}),!!ie.length&&(0,_i.jsx)(om,{config:t,merchantProperties:R,localizations:P,features:T,currentPage:f,totalPages:h,totalReviews:m,pageSize:_,onShowNext:Ee,onShowPrevious:Ce,onBackToTop:je}),ke]}))})]})})),Im=["merchantProperties","localizations","features"],km=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a1?(0,Jo.WU)((0,fo.ZP)(n,v),e):(0,fo.ZP)(i,v)}var N=I?k(l,{singular:"review_display.4.0.common.rating_count_singular",plural:"review_display.4.0.common.rating_count_plural",none:"review_display.4.0.common.no_ratings"}):k(s,{singular:"review_display.4.0.common.review_count_singular",plural:"review_display.4.0.common.review_count_plural",none:"review_display.4.0.no_reviews"}),R=I?"rating":"review";function P(e){return(0,fo.ZP)(e?"review_display.4.0.write_a_review":"review_display.4.0.write_the_first_review",v)}var T,A,L=P(I?l:s),O=m()(o).call(o,(function(e){return"histogram"===e.display_type&&("sizing"===e.key||"size"===e.key||"fit"===e.key)}))[0];O&&(T=y()(A=O.display_values).call(A,(function(e,t){var r,n=m()(r=gn()(O)).call(r,(function(t){return t.label===e}))[0];return n?d()(d()({},n),{},{position:t}):{label:e,count:0,position:t}})));var D=x&&0!==s?E?null:(0,_i.jsx)(Xo,{children:(0,_i.jsx)(No,{ratingValue:c,reviewCount:s,children:(0,_i.jsx)(Uo,{children:(0,_i.jsx)(Mo,{name:n||g,parentID:h.structured_data_product_id})})})}):null;return(0,_i.jsxs)(Qi.BS,{as:"section",onChange:this.onVisibilityChange,"data-testid":"review-snippet",className:"pr-review-snippet-container "+(s?"":"pr-no-reviews"),lang:(0,or.H)(_),children:[(0,_i.jsx)(df,{ratingValue:c||0,recommendedPercent:a?100*a:0,reviewCount:s,countLabel:N,countType:R,warLinkLabel:L,localizations:v,merchant_properties:p,config:h,productKey:g,isCountLinkEnabled:s>0,starStyles:j,localeOverride:_,merchantOverride:w}),C&&O&&(0,_i.jsxs)("div",{className:"pr-snippet-slider-root",children:[(0,_i.jsx)("div",{className:"pr-snippet-title",children:O.name||"Size"}),(0,_i.jsx)(Ff,{className:"pr-snippet-slider",minText:O.display_values[0],maxText:O.display_values[O.display_values.length-1],selected:(0,Bt.iv)(T),selectedLabel:(0,Bt.g_)(T)})]}),D]})},t}(xe.Component),Dm={getReviews:Ar,getSnippets:Lr},Mm=(0,gi.$j)((function(e,t){var r=(0,Nt.iC)(t.config,e.Reviews.localeOverride,e.Reviews.merchantOverride),n=e.Reviews[r]||{};return d()(d()({},n),{},{productKey:r,localeOverride:e.Reviews.localeOverride,merchantOverride:e.Reviews.merchantOverride})}),Dm)((function(e){var t=(0,xe.useContext)(Ui.E_),r=t.merchantProperties,n=t.localizations,i=t.features,o=t.displayApi;e.merchantOverride&&e.localizations&&(n=e.localizations);var a=(0,bi.dZ)();return(0,_i.jsx)(Om,d()(d()({},e),{},{displayApi:o,sendBeacon:a,merchantProperties:r,localizations:n,features:i}))})),Fm={key:Qe,dataRequirements:dt,type:St,component:Mm},zm=function(e){function t(t){var r;return r=e.call(this,t)||this,po()(co()(r),"elementToFocusRef",xe.createRef(null)),po()(co()(r),"handleClose",(function(e,t){r.setState({closed:!0}),r.props.onClose(e,t)})),r.state={isAutoSubmitting:Bn(r.props.config,r.props.purchase),closed:!1},r}vi()(t,e);var r=t.prototype;return r.componentDidUpdate=function(e,t){!1===e.isComplete&&!0===this.props.isComplete&&((0,Jo.ub)((0,fo.ZP)("ryp.thank_you.header",this.props.localizations.write_a_review)),this.elementToFocusRef.current&&this.elementToFocusRef.current.focus()),!0===this.state.isAutoSubmitting&&!0===this.props.isComplete&&(this.elementToFocusRef.current&&this.elementToFocusRef.current.focus(),(0,Jo.ub)((0,fo.ZP)("ryp.thank_you.header",this.props.localizations.write_a_review)),this.setState({isAutoSubmitting:!1}))},r.render=function(){var e,t=this,r=this.props,n=r.id,i=r.isComplete,o=r.localizations,a=r.product,s=r.progressiveInfo,l=r.order,c=Nt.Cu(a),u=(0,fo.ZP)("ryp.purchase.dismiss_button_label",o.write_a_review),d=s&&!1!==s.is_progressive_type&&"false"!==s.is_progressive_type&&Number(s.current_step)>0;return c&&(e=(0,_i.jsx)("img",{className:i?"ryp-product-img_complete":"ryp-product-img",src:c,alt:(0,fo.ZP)("cd.common.media.product_image",o)})),i?(0,_i.jsxs)("div",{className:vo()("ryp-purchase ryp-purchase--complete",{"ryp-purchase--closed":this.state.closed}),children:[e,(0,_i.jsx)("div",{className:"ryp-purchase_thank-you-text",children:(0,fo.ZP)("ryp.thank_you.header",o.write_a_review)}),(0,_i.jsx)("button",{type:"button",className:"ryp-purchase_close-btn","aria-label":u,ref:this.elementToFocusRef,onClick:function(){return t.handleClose(a,n)},children:(0,_i.jsx)(Is,{lineStrokeSize:"2",circleOutline:!1})})]}):(0,_i.jsxs)("div",{className:vo()("ryp-purchase col-sm-12",{"ryp-purchase--closed":this.state.closed}),children:[d&&(0,_i.jsx)("button",{type:"button",className:"ryp-purchase--close","aria-label":(0,fo.ZP)("ryp.purchase.close_button_label",o.write_a_review),onClick:function(){return t.handleClose(a,n)},children:(0,_i.jsx)(Is,{lineStrokeSize:"1",circleOutline:!1})}),(0,_i.jsx)("div",{className:"col-sm-3",children:e}),(0,_i.jsxs)("div",{className:"col-sm-9",children:[(0,_i.jsx)(Zi.X6,{importance:1,className:"ryp-product-title",children:a.name}),null!=l&&(0,_i.jsxs)("div",{className:"ryp-order-text",children:[(0,_i.jsx)(af,{}),(0,_i.jsx)("span",{className:"ryp-purchased-date",children:o.write_a_review["ryp.purchase.purchased_date"].replace("{0}",Nt.s7(o.powerreviews.date_format||"mm/dd/yyyy",new Date(l.order_date).toString()))}),(0,_i.jsx)("div",{className:"pr-break"})]})]}),this.props.children]})},t}(Ad.Z),Vm=zm,qm=r(95058),Wm=r(3864),Um=r(71670),Zm=r(83505),Bm=r(57969),Hm=r(16183),Km="NO_COOKIES",Gm="DISABLED",Qm={uidCookiePrefix:"__pr.",uidLength:10,uidCookieExpiration:63072e3,userTrackingDomain:"",trackingPixelUrl:"https://t.powerreviews.com/t/v1.gif"},Ym={event:"e",eventType:"et",userId:"uid",time:"t",locale:"l",merchantGroupId:"mgid",merchantId:"mid",pageId:"pid",pageIdVariant:"pidv",siteId:"sid",pageUrl:"p",referrerUrl:"r",reviewCount:"rc",starRating:"s",inlineSEO:"i",engineVersion:"v",questionCount:"qc",answerCount:"ac",visible:"vis",synMerchantId:"symid",synSharedReviewIds:"sysrids",synReviewsOnPageCount:"syropc",compact:"c",profileId:"prid",displayVersion:"v",eventFlow:"ef",orderId:"oid",orderSubtotal:"os",orderNumberOfItems:"on",orderItems:"oi",merchantUserId:"muid",userEmail:"ue",userFirstName:"uf",userLastName:"ul",userFullName:"un",marketingOptIn:"mo",productBrandName:"bn",productName:"n",productDescription:"d",productUrl:"pu",productImageUrl:"iu",productPrice:"pri",productCategoryName:"cn",productInStock:"is",productManufacturerId:"mi",productUpc:"upc",productAddToCartUrl:"atcu",testGroup:"tg",rypSort:"sort",rypPageIds:"pids",rypCompletedStep:"step",asin:"asn",bestBuySku:"stbb",coolBlueSku:"stcb"},$m=function(e,t){var r=Qm.uidCookiePrefix+Wi()(e,10).toString(36);if(t)return"no_cookie";var n,i=(0,Nt.ej)(r);return i||(i=(0,Nt.zs)(Qm.uidLength)),(0,Nt.d8)(r,i,Qm.uidCookieExpiration,(n=(n=Qm.userTrackingDomain)&&n.replace(/^\s+|\s+$/g,""))?("."!==n.charAt(0)&&(n="."+n),n):null),i},Xm=function e(t,r){void 0===r&&(r=0);var n=[],i=[";",","];if((0,Nt.gg)(t,"array")&&r0?c:l;return y()(n=o()(i=[]).call(i,u)).call(n,(function(e,t){var r=function(e){0===t&&(a.firstFieldRef.current=e)},n=function(t){var r;"TextBox"!==e.input_type&&"TextArea"!==e.input_type?a.props.updateField(e.id,t):a.setState({currentTextFieldValues:d()(d()({},a.state.currentTextFieldValues),{},(r={},r[e.id]=t,r))})};if("TextBox"===e.input_type)return(0,_i.jsx)(qm.Z,{ref:r,error:e.error_message,fieldIndex:t,id:"pr-"+e.key+"-"+a.props.id,isRequired:e.required,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),isValid:e.isValid,label:e.label,maxCharacters:e.max_length,placeholder:e.helper_text,preset:e.value,value:e.value,handleFieldUpdate:n,localizations:a.props.localizations},e.id);if("TextArea"===e.input_type)return(0,_i.jsx)(Um.Z,{ref:r,count:e.count,error:e.error_message,fieldIndex:t,id:"pr-"+e.key+"-"+a.props.id,isRequired:e.required,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),preset:e.value,isValid:e.isValid,label:e.label,placeholder:e.helper_text,localizations:a.props.localizations,handleFieldUpdate:n},e.id);if("Stars"===e.input_type)return a.ratingOnlyEnabled?(0,_i.jsx)(Wm.Z,{ref:r,id:"pr-"+e.key+"-"+a.props.id,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),onChange:a.onRatingChange,handleFieldUpdate:n,preset:a.autosubmitRatingOnly()?a.props.config.rating:e.value,statusMessage:(0,_i.jsx)(ov.P,{onClick:function(){return a.onRatingChange(a.state.ratingSelected)},localizations:a.props.localizations,status:a.state.ratingOnlyStatus}),autosubmitRatingOnly:a.autosubmitRatingOnly()},e.id):(0,_i.jsx)(Wm.Z,{ref:r,id:"pr-"+e.key+"-"+a.props.id,label:a.props.product.name,preset:e.value,isRequired:e.required,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),isValid:e.isValid,isVisible:e.isVisible,error:e.error_message,handleFieldUpdate:n,localizations:a.props.localizations},e.id);if("composite"===e.field_type&&"Image"===e.composite_type)return(0,_i.jsx)(Zm.Z,{ref:r,mediaType:e.composite_type,count:e.count,error:e.error_message,fieldIndex:t,files:e.files,id:"pr-"+e.key+"-"+a.props.id,isRequired:e.required,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),isValid:e.isValid,isVisible:e.isVisible,label:e.prompt||e.label,subfields:e.fields,validationType:e.validationType,values:gn()(e),autoSubmit:!0,localizations:a.props.localizations,config:a.props.config,merchantProperties:a.props.merchant.configuration,handleFieldUpdate:n},e.id);if("AgeDisclosure"===e.input_type||"RadioVertical"===e.input_type||"RadioHorizontal"===e.input_type||"RadioHorizontalLinked"===e.input_type){var i=e.choices||[];return(0,_i.jsx)(Ud.Z,{ref:r,choices:i,error:e.error_message,id:"pr-"+e.key+"-"+a.props.id,isRequired:e.required,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),isValid:e.isValid,isVisible:e.isVisible,label:e.label,inputType:e.input_type,handleFieldUpdate:n,localizations:a.props.localizations},e.id)}if("CheckboxVertical"===e.input_type){var o=e.choices||[];return(0,_i.jsx)(Bm.Z,{ref:r,choices:o,error:e.error_message,id:"pr-"+e.key+"-"+a.props.id,isRequired:e.required,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),isValid:e.isValid,isVisible:e.isVisible,label:e.label,values:gn()(e),allowCustomTags:!1,handleFieldUpdate:n,localizations:a.props.localizations},e.id)}if("Dropdown"===e.input_type){var s=e.choices||[];return(0,_i.jsx)(Hm.Z,{ref:r,tags:s,error:e.error_message,id:"pr-"+e.key+"-"+a.props.id,isRequired:e.required,requiredText:(0,fo.ZP)("write_a_review.required_label",a.props.localizations.write_a_review),isValid:e.isValid,isVisible:e.isVisible,label:e.label,preset:e.value,allowCustomTags:!1,handleFieldUpdate:n,localizations:a.props.localizations},e.id)}return null}))},r.render=function(){var e,t=(0,fo.ZP)("submit_review_button_label",this.props.localizations.write_a_review),r=this.props.progressiveInfo&&this.props.progressiveInfo.is_progressive_type;r&&!this.props.progressiveInfo.is_last_step&&(t=(0,fo.ZP)("continue",this.props.localizations.write_a_review));var n,i=r&&0===Number(this.props.progressiveInfo.current_step)||!r?"ryp-stars":"ryp-progressive-field",o=this.props.localizations?(0,fo.ZP)("legal",this.props.localizations.write_a_review):"",a=this.mapFieldsToComponents(this.props.fields,r?this.props.progressiveInfo.current_step:0);return(m()(e=this.props.fields).call(e,(function(e){return!!e.value})).length>0||this.props.progressiveInfo&&this.props.progressiveInfo.is_progressive_type&&Number(this.props.progressiveInfo.current_step)>0)&&(n=!this.ratingOnlyEnabled||("success"===this.state.ratingOnlyStatus||Number(this.props.progressiveInfo.current_step)>0)),(0,_i.jsxs)("div",{children:[(0,_i.jsx)("div",{className:"col-sm-9 ryp-first-q "+i,children:a[0]}),(0,_i.jsxs)("div",{className:"col-sm-12 "+(n?"":"pr-hide"),children:[Ni()(a).call(a,1),(0,_i.jsx)("div",{className:"ryp-footer",children:(0,_i.jsx)(Yd.Z,{showLegal:!0,legalText:o,disabled:this.props.requestInProgress||this.props.isLoading,onClick:this.onSubmit.bind(this),onKeyDown:this.onKeyDown.bind(this),children:t})})]})]})},t}(xe.Component),sv=xe.forwardRef((function(e,t){return(0,_i.jsx)(av,d()(d()({},e),{},{ref:t}))})),lv=function(e){function t(t){var r;return r=e.call(this,t)||this,po()(co()(r),"closeTimeout",null),po()(co()(r),"activateFormRef",xe.createRef()),r.state={done:!1,indexToFocus:null},r.completedPurchases=r.completedPurchases.bind(co()(r)),r}vi()(t,e);var r=t.prototype;return r.componentDidMount=function(){!function(e,t,r){tv(rv.ZP.RYP.social_measurement_id,{locale:e.locale,merchantId:e.merchant_id,merchantGroupId:e.merchant_group_id,siteId:e.site_id,displayVersion:Wi()("4.0",0),eventFlow:rv.ZP.RYP.start,rypSort:t.configuration.ryp_sort_order,rypPageIds:nv(r)})}(this.props.config,this.props.merchant,this.props.purchases)},r.componentDidUpdate=function(e,t){var r,n,i=this;(this.completedPurchases().length===this.props.purchases.length&&setTimeout((function(){return i.setState({done:!0})}),3e3),t.indexToFocus!==this.state.indexToFocus||0===t.indexToFocus&&0===this.state.indexToFocus&&e.purchases.length!==this.props.purchases.length)&&(null===(r=this.activateFormRef)||void 0===r||null===(n=r.current)||void 0===n||n.focus())},r.componentWillUnmount=function(){this.closeTimeout&&clearTimeout(this.closeTimeout)},r.completedPurchases=function(e){return void 0===e&&(e=this.props.purchases),e?m()(e).call(e,(function(e){return e.isComplete})):[]},r.onClose=function(e,t){var r=this;this.closeTimeout=setTimeout((function(){r.props.close(r.props.config,e.page_id,e.variant,t).then((function(){r.setState({indexToFocus:r.props.purchases.length===t?0:t})}))}),300)},r.render=function(){var e=this,t=this.props,r=t.config,n=t.localizations,i=t.merchant,o=t.purchases,a=t.validateForm,s=t.updateField,l=t.submit,c=i.return_url||(window.location.origin?window.location.origin+"/":window.location.protocol+"/"+window.location.host),u=!!(0,Se.$)("enable_enhanced_content_security",i.configuration,r,!0),d=0===o.length?(0,fo.ZP)("ryp.no_purchases.header",n.write_a_review):(0,fo.ZP)("ryp.complete.header",n.write_a_review),p=0===o.length?(0,fo.ZP)("ryp.no_purchases.call_to_action",n.write_a_review):(0,fo.ZP)("ryp.complete.call_to_action",n.write_a_review);if(0===o.length||this.state.done)return(0,_i.jsxs)("div",{className:"ryp-purchase text-center",children:[(0,_i.jsx)("p",{children:(0,_i.jsx)("strong",{children:d})}),!u&&(0,_i.jsx)("a",{role:"button",className:"pr-btn pr-btn-default pr-btn-review pr-accessible-btn",href:c,children:p})]});var f=y()(o).call(o,(function(t,c){var u,d=t.product_information.page_id+"-"+(t.product_information.variant||"");return(0,_i.jsx)("li",{children:(0,_i.jsx)(Vm,{id:c,config:r,localizations:n,progressiveInfo:t.progressive_info,product:t.product_information,order:t.order_information||null,isComplete:t.isComplete,purchase:t,onClose:function(t,r){return e.onClose(t,r)},children:(0,_i.jsx)(sv,{id:c,isLoading:e.props.isLoading,fields:t.review_template,config:r,merchant:i,merchantID:t.merchant_id,localizations:n,purchaser:e.props.purchaser,progressiveInfo:t.progressive_info,product:t.product_information,purchase:t,purchases:o,requestInProgress:m()(u=t.review_template).call(u,(function(e){return e.syncStatus===wn.ZP.IN_PROGRESS})).length>0||t.isLoading,onClose:function(t,r){return e.onClose(t,r)},validateForm:a,submit:l,updateField:function(e,t){s(r,c,e,t)},ref:function(t){c===e.state.indexToFocus&&(e.activateFormRef.current=t)}})})},d)}));return(0,_i.jsx)("div",{className:"pr-ryp-list"+(this.props.isAutoSubmitting?" pr-hide":""),children:(0,_i.jsx)("ul",{children:f})})},t}(xe.Component),cv={validateForm:function(e,t){var r=(0,Nt.dz)(e);return{type:Yn,rypKey:r,purchaseIndex:t}},updateField:function(e,t,r,n){var i=(0,Nt.dz)(e);return function(e){return gn()(n)&&gn()(n).forEach((function(n,o){"Image"!==n.composite_type||n.isUploaded||(0,Sn.$i)(n.file.file,_n.k4).then((function(n){e({type:ni,rypKey:i,purchaseIndex:t,fieldID:r,valueIndex:o,composite_data:n})}))})),e({type:ri,rypKey:i,purchaseIndex:t,fieldID:r,fieldUpdates:n})}},submit:function(e,t,r,n,i,a){var s=(0,Nt.dz)(e);return function(l){return l({type:Xn,rypKey:s}),function(e,t,r,n,i,a,s){var l;void 0===a&&(a=0);var c={fields:ai(r)},u=y()(l=c.fields).call(l,(function(e){return new(N())((function(t){if("Image"===e.composite_type&&e.rotation){var r=e.composite_data.raw.url.replace("/upload/","/upload/a_"+e.rotation+"/");return(0,Sn.$i)({source:r},_n.k4).then((function(r){t(d()(d()({},e),{},{composite_data:r}))}))}t(e)}))}));return N().all(u).then((function(r){c.fields=r,!i||function(e){return e&&e.is_progressive_type}(n)&&!function(e){return 0===e.current_step}(n)||(c.iovation_black_box=i),s&&(c.tracking_user_id=s);var l=d()(d()({},t),{},{merchant_id:t.purchase_merchant_id,is_complete:!0,current_step:n&&n.is_progressive_type?n.current_step:null});return(0,Sn.xi)(c,l).then((function(r){var i=!0;n&&n.is_progressive_type&&!n.is_last_step&&200===r.statusCode&&(i=!1);var s,l=(0,Nt.dz)(t),c=r.body;switch(r.statusCode){case 200:s=Jn;break;case 400:if(s=ti,r.body.fields){var u,p,f,h,v,g=m()(u=b()(p=y()(f=m()(h=r.body.fields).call(h,(function(e){return e.fields}))).call(f,(function(e){return e.fields}))).call(p,(function(e,t){return o()(e).call(e,t)}),[])).call(u,(function(e){return e.error_message&&e.error_message.error_code===yn.Z.RESTRICTED_WORD})),_=m()(v=r.body.fields).call(v,(function(e){return e.error_message&&e.error_message.error_code===yn.Z.RESTRICTED_WORD}));(_.length>0||g.length>0)&&(s=ei,c=d()(d()({},r.body),{},{message:_.length>0?_[0].error_message.message:g[0].error_message.message}))}break;default:s=ti}return e({type:s,rypKey:l,pageId:t.page_id,body:c,isComplete:i,purchaseIndex:a})}))}))}(l,e,t,r,n,i,a)}},close:function(e,t,r,n){var i=(0,Nt.dz)(e);return function(o){return(0,Sn.fN)(e,{review_type:"ryp",page_id:t,page_id_variant:r}).then((function(){return o({type:$n,rypKey:i,purchaseIndex:n})}))}}},uv=(0,gi.$j)(null,cv)((0,tp.r)(lv)),dv=r(68291),pv=function(e){function t(){return e.apply(this,arguments)||this}vi()(t,e);var r=t.prototype;return r.componentDidMount=function(){this.props.getTemplate(this.props.config)},r.componentDidUpdate=function(e){this.props.config.on_render&&!e.purchases&&this.props.purchases&&Gc.Z.onWriteComponentRender(Kc.ZP.ReviewYourPurchases,this.props)},r.render=function(){return this.props.purchases||this.props.error?this.props.config.page_id&&(this.props.error||this.props.purchases&&0===this.props.purchases.length)?(0,_i.jsx)(dv.Z,{config:this.props.config}):this.props.error?(0,_i.jsx)("div",{className:"p-w-r",children:(0,_i.jsx)(Fd.Z,{isVisible:!0,message:this.props.error.detail||this.props.error.message})}):(0,_i.jsxs)("div",{className:"p-w-r","data-testid":"ryp",children:[this.props.isAutoSubmitting&&(0,_i.jsx)(fl.Z,{isVisible:!0}),(0,_i.jsx)(Zi.X6,{importance:1,className:this.props.isAutoSubmitting?"pr-hide":"",children:(0,fo.ZP)("ryp.header",this.props.localizations.write_a_review)}),(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(uv,{merchant:this.props.merchant_information,purchaser:this.props.purchaser_information,purchases:this.props.purchases,localizations:this.props.localizations,config:this.props.config,isLoading:this.props.isLoading,isAutoSubmitting:this.props.isAutoSubmitting})})]}):(0,_i.jsx)("div",{className:"p-w-r",children:(0,_i.jsx)(fl.Z,{isVisible:!0})})},t}(xe.Component),fv=(0,gi.$j)((function(e){return e}),(function(e){return{getTemplate:function(t){return e(function(e,t){void 0===t&&(t=!0);var r=(0,Nt.dz)(e);return function(n){return t&&n({type:Hn,rypKey:r}),(0,Sn.dv)(e,{includeLocalizations:!0}).then((function(t){var i,o=!1;switch(t.statusCode){case 200:i=Kn,(t.body.purchases||[]).forEach((function(t){Bn(0,t)&&(t.review_template=(0,Nt.bY)(e,t.review_template),o=!0)}));break;case 404:i=Gn;break;default:i=Qn}return n({type:i,rypKey:r,body:t.body||null,isAutoSubmitting:o})})).catch((function(e){console.log(e)}))}}(t))}}}),(function(e,t,r){var n=Nt.dz(r.config),i=e.ReviewYourPurchases[n];return d()(d()(d()({},t),r),{},{purchases:i?i.purchases:null,error:i?i.error:null,localizations:i?i.localizations:null,merchant_information:i?i.merchant_information:null,purchaser_information:i?i.purchaser_information:null,isLoading:i?i.isLoading:null,isAutoSubmitting:i?i.isAutoSubmitting:null,rypKey:n})}))(pv),hv={key:rt,type:gt,component:fv},mv=r(68503),vv=function(e){function t(t){return e.call(this,t)||this}vi()(t,e);var r=t.prototype;return r.componentDidMount=function(){if(this.props.config.on_submit){var e,t,r=y()(e=m()(t=this.props.fields).call(t,(function(e){return(e.value||gn()(e))&&!e.composite_type}))).call(e,(function(e){var t={};return e.value?t.value=e.value:gn()(e)&&(t.values=gn()(e)),d()(d()({},t),{},{key:e.key})}));Gc.Z.onWriteComponentSubmit(Kc.ZP.SellerRatings,this.props,{fields:r})}var n=document.getElementById("pr-srw");this._fadeOut(n)},r._fadeOut=function(e,t){void 0===t&&(t={startDelay:2500,duration:1e3,easeType:"ease"}),e&&setTimeout((function(){e.style.cssText+="opacity: 0;-moz-transition: opacity "+t.duration+"ms "+t.easeType+";-webkit-transition: opacity "+t.duration+"ms "+t.easeType+";-ms-transition: opacity "+t.duration+"ms "+t.easeType+";-o-transition: opacity "+t.duration+"ms "+t.easeType+";transition: opacity "+t.duration+"ms "+t.easeType+";",setTimeout((function(){e.style.cssText="display:none;"}),t.duration)}),t.startDelay)},r.render=function(){return(0,_i.jsxs)("div",{className:"pr-srw-thank-you pr-srw-success",children:[(0,_i.jsx)(af,{}),(0,_i.jsx)(Zi.X6,{importance:3,children:(0,fo.ZP)("sellerRatings.thankyou.text",this.props.localizations)})]})},t}(xe.Component),gv=vv,_v=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a57?h+"...":h;c[u].value=p}s(l,c)}})),po()(co()(r),"handleFieldChange",(function(e,t){var n,i=o()(n=[]).call(n,r.props.fields);i[t]=d()(d()({},i[t]),e),r.props.onFieldChange(i),r._setHeadlineValue(i)})),po()(co()(r),"updateFieldValidity",(function(e){void 0===e&&(e=[]);var t=y()(e).call(e,(function(e){var t=d()({},e),r=gn()(t)||t.value;return t.hasOwnProperty("is_required")?t.isValid=Nt.K0(r,t.is_required,t.validationType):e.hasOwnProperty("required")&&(t.isValid=Nt.K0(r,t.required,t.validationType)),t}));r.props.updateFields(r.props.config,t)})),po()(co()(r),"handleSubmit",(function(e){e&&e.preventDefault();var t=r.props,n=t.config,i=(t.merchant,t.product),o=t.contextInformation,a=t.submitWAR,s=t.setSubmitErrorMessage,l=t.localizations;r.updateFieldValidity(r.props.fields),setTimeout((function(){var e=r.props,t=e.fields,c=e.iovationRequired;if(!!t.some((function(e){return!e.isValid})))return setTimeout((function(){var e=document.getElementsByClassName("pr-invalid-field")[0];e&&e.focus()}),0);var u=m()(t).call(t,(function(e){return e.value||gn()(e)&&Array.isArray(gn()(e))&&gn()(e).length})),d=window.ioGetBlackbox?window.ioGetBlackbox().blackbox:null;if(!d&&c)return s(n,(0,fo.ZP)("error.adblock_interference",l.powerreviews));document.getElementById("pr-war")&&document.getElementById("pr-war").scrollIntoView(),a(n,u,i,o,d).then((function(){r.props.submitError&&Nt.Kn(Qd.Z.SUBMISSION_ERROR,{fields:r.props.fields,error:{hasError:r.props.submitError,message:r.props.submitErrorMessage}}),r.props.isReviewSubmitted&&(Nt.Kn(Qd.Z.COMPLETE,{fields:r.props.fields,error:{hasError:r.props.submitError,message:r.props.submitErrorMessage}}),r.sendBeacon({eventFlow:bi.GM[r.props.type].complete}))}))}))})),r}vi()(t,e);var r=t.prototype;return r.componentDidMount=function(){var e=this,t=this.props,r=t.getWARTemplate,n=t.config;r(n).then((function(){e.props.fetchError||(window.POWERREVIEWS.submission=window.POWERREVIEWS.submission||{},window.POWERREVIEWS.submission.set=e.setField,e.onLoadSuccess()),Nt.Kn(Qd.Z.LOADED),n.on_render&&Gc.Z.onWriteComponentRender(Kc.ZP.SellerRatings,e.props)}))},r.render=function(){var e=this,t=this.props,r=t.fields,n=void 0===r?[]:r,i=t.isLoading,o=t.isSubmitting,a=t.fetchError,s=t.fetchErrorType,l=t.fetchErrorMessage,c=t.submitErrorMessage,u=t.isReviewSubmitted,d=t.type,p=t.merchant,f=void 0===p?{}:p,h=t.config,m=t.localizations,v=void 0===m?{}:m,g=i||o,_=g||a,w=l||c,b="p-w-r";b+=Nt.UB()?" pr-ie8":"";var x="pr-war";return x+=_?" pr-hide":"",x+=s===yn.Z.MISSING_PARAMETER?" pr-hide":"",s===yn.Z.DUPLICATE_REVIEW?(0,_i.jsx)("div",{className:b,children:(0,_i.jsxs)("div",{role:"alert",className:"pr-alert pr-alert-info",children:[(0,_i.jsx)("h4",{children:"Sorry!"}),(0,_i.jsx)("p",{children:"According to our records, youve already written a review for this product."})]})}):u?(0,_i.jsxs)("div",{className:b,children:[(0,_i.jsx)("div",{}),(0,_i.jsx)(gv,{id:"thanks-iframe",frameBorder:"0",type:d,fields:n,config:h,localizations:v.write_a_review,reviewComplete:!0})]}):(0,_i.jsxs)("div",{children:[(0,_i.jsx)("div",{}),(0,_i.jsxs)("div",{className:b,children:[(0,_i.jsx)(fl.Z,{isVisible:g}),(0,_i.jsx)(Fd.Z,{message:w,type:"danger",isVisible:!!w}),(0,_i.jsxs)("div",{role:"form",className:x,children:[(0,_i.jsx)("div",{id:"pr-war-form",children:(0,_i.jsx)("fieldset",{children:y()(n).call(n,(function(t,r){return(0,_i.jsx)(Wd.Z,{field:t,fieldIndex:r,handleFieldUpdate:e.handleFieldChange,localizations:v,requiredText:(0,fo.ZP)("write_a_review.required_label",v.write_a_review)},t.id)}))})}),(0,_i.jsx)(mv.Z,{localizations:v,usePRFooterClass:!0,merchant:f,config:h,onSubmit:this.handleSubmit})]})]})]})},t}(xe.Component),yv={getWARTemplate:bn.qb,submitWAR:bn.IK,updateFields:bn.DV,setSubmitErrorMessage:bn.Qw},wv=(0,gi.$j)((function(e,t){var r=Nt.iC(t.config),n=e.WriteAReview[r];return d()({},n)}),yv)((0,tp.r)(_v)),bv=function(e){function t(t){var r;return r=e.call(this,t)||this,po()(co()(r),"RootNode",xe.createRef()),po()(co()(r),"handleFormLoad",(function(e,t){r.setState({isInitialized:!0,localizations:e,merchant:t},(function(){"long"!==r.props.config.srwVariant&&"short"!==r.props.config.srwVariant||!0!==Nt.b1()&&(r._expandTimer=setTimeout((function(){r.setState({isOpen:!0})}),3e3))}))})),po()(co()(r),"handleFieldChange",(function(e){"mini"===r.props.config.srwVariant&&!1===r.state.isOpen&&e.length>0&&e.forEach((function(e){"rating"===e.key&&e.value&&r.setState({isOpen:!0})}))})),r.state={isOpen:!1,isInitialized:!1,localizations:{}},r._onClick=r._onClick.bind(co()(r)),r._expandTimer=null,r}vi()(t,e);var r=t.prototype;return r.componentWillUnmount=function(){clearTimeout(this._expandTimer)},r._onClick=function(e){var t;e.preventDefault(),t=!0!==this.state.isOpen,this.setState({isOpen:t})},r._handleCloseWidget=function(e){var t=this.RootNode.current;e&&e.preventDefault(),t&&(t.style.cssText+="display:none;")},r.render=function(){var e,t,r,n=this.state.isOpen?"pr-srw-body pr-srw-open":"pr-srw-body",i=this.state.isOpen?"pr-srw-header":"pr-srw-header pr-pulse pr-srw-header-open",o="pr-srw";if(this.state.isInitialized)switch(this.props.config.srwVariant){case"short":o+=" pr-srw-short",r=(0,fo.ZP)("sellerRatings.short.headline.text",this.state.localizations.write_a_review);break;case"long":o+=" pr-srw-long",r=(0,fo.ZP)("sellerRatings.long.headline.text",this.state.localizations.write_a_review);break;case"mini":o+=" pr-srw-mini",r=(0,fo.ZP)("sellerRatings.mini.headline.text",this.state.localizations.write_a_review)}else o+=" hidden";return"mini"===this.props.config.srwVariant?(e=(0,_i.jsx)("button",{type:"button","aria-label":"Close",className:"pr-close-btn js-pr-close-btn",onClick:this._handleCloseWidget.bind(this)}),t=(0,_i.jsxs)("div",{role:"document","aria-label":r,className:n,"aria-expanded":this.state.isOpen,children:[(0,_i.jsx)(Zi.X6,{importance:1,className:"pr-srw-mini-headline",children:r}),(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(wv,{onFieldChange:this.handleFieldChange,onFormLoad:this.handleFormLoad,type:this.props.type,config:this.props.config})})]})):(e=(0,_i.jsxs)("div",{role:"button",className:i,onClick:this._onClick,children:[(0,_i.jsx)(Zi.X6,{importance:1,children:r}),(0,_i.jsx)("div",{"aria-hidden":"true",className:"pr-srw-arrow-icon pr-arrow-icon"})]}),t=(0,_i.jsx)("div",{role:"document","aria-label":r,className:n,"aria-expanded":this.state.isOpen,children:(0,_i.jsx)(Zi.y5,{children:(0,_i.jsx)(wv,{onFieldChange:this.handleFieldChange,onFormLoad:this.handleFormLoad,type:this.props.type,config:this.props.config})})})),(0,_i.jsx)("div",{ref:this.RootNode,role:"dialog",id:"pr-srw","data-testid":"srw",className:o,children:(0,_i.jsxs)("div",{className:"pr-srw-wrapper",children:[e,t]})})},t}(xe.Component),xv={key:nt,type:_t,component:bv},Ev=function(e){function t(){for(var t,r,n=arguments.length,i=new Array(n),a=0;a'}})},t}(mp.Z),zv=Fv,Vv=function(e){var t=e.answer,r=e.localizations,n="";if(t.identifiers.created_date){var i={day_ago:(0,fo.ZP)("review_display.4.0.common.day_ago",r),days_ago:(0,fo.ZP)("review_display.4.0.common.days_ago",r),months_ago:(0,fo.ZP)("review_display.4.0.common.months_ago",r),years_ago:(0,fo.ZP)("review_display.4.0.common.years_ago",r)};n=(0,Nt.Jn)(t.identifiers.created_date,i)}var o=t.details.author_nickname?(0,_i.jsx)("p",{className:"pr-wyb-answer-name",children:t.details.author_nickname}):null;return(0,_i.jsxs)("article",{className:"pr-wyb-col",children:[(0,_i.jsx)(zv,{}),(0,_i.jsxs)("div",{className:"pr-wyb-answer-container",children:[(0,_i.jsx)("p",{className:"pr-wyb-answer",children:""+t.details.text}),(0,_i.jsxs)("div",{className:"pr-wyb-answer-info",children:[o,t.identifiers.created_date&&(0,_i.jsx)("p",{className:"pr-wyb-answer-date",children:n})]})]})]})},qv=(0,gi.$j)((function(e){return e}),null,(function(e,t,r){var n=(0,Nt.iC)(r.config),i=e.Answers[n];return d()(d()(d()(d()({},t),r),e),{},{data:i,currentContainerClass:e.Answers.currentContainerClass,currentIndex:e.Answers.currentIndex,localizations:e.Answers.localizations})}))((function(e){if(!e.data||!e.data.results||e.data.isQuerying)return(0,_i.jsx)("div",{className:"pr-wyb-empty"});for(var t=[],r=0,n=e.data.results.length;r0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"createFakeElement",value:function(){var e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var t=window.pageYOffset||document.documentElement.scrollTop;return this.fakeElem.style.top="".concat(t,"px"),this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.fakeElem}},{key:"selectFake",value:function(){var e=this,t=this.createFakeElement();this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.container.appendChild(t),this.selectedText=l()(t),this.copyText(),this.removeFake()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=l()(this.target),this.copyText()}},{key:"copyText",value:function(){var e;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),document.activeElement.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==c(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}],r&&u(t.prototype,r),n&&u(t,n),e}(),p=d;function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===f(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=a()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new p({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return y("action",e)}},{key:"defaultTarget",value:function(e){var t=y("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return y("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],n=[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,r=!!document.queryCommandSupported;return t.forEach((function(e){r=r&&!!document.queryCommandSupported(e)})),r}}],r&&h(t.prototype,r),n&&h(t,n),o}(i()),b=w},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,r){var n=r(828);function i(e,t,r,n,i){var a=o.apply(this,arguments);return e.addEventListener(r,a,i),{destroy:function(){e.removeEventListener(r,a,i)}}}function o(e,t,r,i){return function(r){r.delegateTarget=n(r.target,t),r.delegateTarget&&i.call(e,r)}}e.exports=function(e,t,r,n,o){return"function"==typeof e.addEventListener?i.apply(null,arguments):"function"==typeof r?i.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return i(e,t,r,n,o)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var r=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===r||"[object HTMLCollection]"===r)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,r){var n=r(879),i=r(438);e.exports=function(e,t,r){if(!e&&!t&&!r)throw new Error("Missing required arguments");if(!n.string(t))throw new TypeError("Second argument must be a String");if(!n.fn(r))throw new TypeError("Third argument must be a Function");if(n.node(e))return function(e,t,r){return e.addEventListener(t,r),{destroy:function(){e.removeEventListener(t,r)}}}(e,t,r);if(n.nodeList(e))return function(e,t,r){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,r)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,r)}))}}}(e,t,r);if(n.string(e))return function(e,t,r){return i(document.body,e,t,r)}(e,t,r);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var r=e.hasAttribute("readonly");r||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),r||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),i=document.createRange();i.selectNodeContents(e),n.removeAllRanges(),n.addRange(i),t=n.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function i(){n.off(e,i),t.apply(r,arguments)}return i._=t,this.on(e,i,r)},emit:function(e){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=r.length;n1?arguments[1]:void 0)}},20841:function(e,t,r){"use strict";var n=r(98576),i=r(8043),o=r(18922),a=r(71795),s=r(21635),l=r(96109),c=r(22091),u=r(84104),d=r(49361),p=r(61669),f=r(78703),h=n.Array;e.exports=function(e){var t=a(e),r=c(this),n=arguments.length,m=n>1?arguments[1]:void 0,v=void 0!==m;v&&(m=i(m,n>2?arguments[2]:void 0));var g,_,y,w,b,x,E=f(t),S=0;if(!E||this==h&&l(E))for(g=u(t),_=r?new this(g):h(g);g>S;S++)x=v?m(t[S],S):t[S],d(_,S,x);else for(b=(w=p(t,E)).next,_=r?new this:[];!(y=o(b,w)).done;S++)x=v?s(w,m,[y.value,S],!0):y.value,d(_,S,x);return _.length=S,_}},48180:function(e,t,r){var n=r(20101),i=r(97739),o=r(84104),a=function(e){return function(t,r,a){var s,l=n(t),c=o(l),u=i(a,c);if(e&&r!=r){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===r)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},50454:function(e,t,r){var n=r(8043),i=r(84120),o=r(2202),a=r(71795),s=r(84104),l=r(71321),c=i([].push),u=function(e){var t=1==e,r=2==e,i=3==e,u=4==e,d=6==e,p=7==e,f=5==e||d;return function(h,m,v,g){for(var _,y,w=a(h),b=o(w),x=n(m,v),E=s(b),S=0,C=g||l,j=t?C(h,E):r||p?C(h,0):void 0;E>S;S++)if((f||S in b)&&(y=x(_=b[S],S,w),e))if(t)j[S]=y;else if(y)switch(e){case 3:return!0;case 5:return _;case 6:return S;case 2:c(j,_)}else switch(e){case 4:return!1;case 7:c(j,_)}return d?-1:i||u?u:j}};e.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},59284:function(e,t,r){"use strict";var n=r(86298),i=r(20101),o=r(41941),a=r(84104),s=r(10424),l=Math.min,c=[].lastIndexOf,u=!!c&&1/[1].lastIndexOf(1,-0)<0,d=s("lastIndexOf"),p=u||!d;e.exports=p?function(e){if(u)return n(c,this,arguments)||0;var t=i(this),r=a(t),s=r-1;for(arguments.length>1&&(s=l(s,o(arguments[1]))),s<0&&(s=r+s);s>=0;s--)if(s in t&&t[s]===e)return s||0;return-1}:c},90242:function(e,t,r){var n=r(76192),i=r(18182),o=r(14218),a=i("species");e.exports=function(e){return o>=51||!n((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},10424:function(e,t,r){"use strict";var n=r(76192);e.exports=function(e,t){var r=[][e];return!!r&&n((function(){r.call(null,t||function(){return 1},1)}))}},90264:function(e,t,r){var n=r(98576),i=r(66235),o=r(71795),a=r(2202),s=r(84104),l=n.TypeError,c=function(e){return function(t,r,n,c){i(r);var u=o(t),d=a(u),p=s(u),f=e?p-1:0,h=e?-1:1;if(n<2)for(;;){if(f in d){c=d[f],f+=h;break}if(f+=h,e?f<0:p<=f)throw l("Reduce of empty array with no initial value")}for(;e?f>=0:p>f;f+=h)f in d&&(c=r(c,d[f],f,u));return c}};e.exports={left:c(!1),right:c(!0)}},1923:function(e,t,r){var n=r(98576),i=r(97739),o=r(84104),a=r(49361),s=n.Array,l=Math.max;e.exports=function(e,t,r){for(var n=o(e),c=i(t,n),u=i(void 0===r?n:r,n),d=s(l(u-c,0)),p=0;c0;)e[n]=e[--n];n!==o++&&(e[n]=r)}return e},s=function(e,t,r,n){for(var i=t.length,o=r.length,a=0,s=0;a1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!_(this,e)}}),o(f,r?{get:function(e){var t=_(this,e);return t&&t.value},set:function(e,t){return g(this,0===e?0:e,t)}}:{add:function(e){return g(this,e=0===e?0:e,e)}}),d&&n(f,"size",{get:function(){return v(this).size}}),u},setStrong:function(e,t,r){var n=t+" Iterator",i=m(t),o=m(n);c(e,t,(function(e,t){h(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=o(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?"keys"==t?{value:r.key,done:!1}:"values"==t?{value:r.value,done:!1}:{value:[r.key,r.value],done:!1}:(e.target=void 0,{value:void 0,done:!0})}),r?"entries":"values",!r,!0),u(t)}}},51057:function(e,t,r){"use strict";var n=r(84120),i=r(40533),o=r(32861).getWeakData,a=r(31138),s=r(35744),l=r(46961),c=r(33442),u=r(50454),d=r(64500),p=r(73326),f=p.set,h=p.getterFor,m=u.find,v=u.findIndex,g=n([].splice),_=0,y=function(e){return e.frozen||(e.frozen=new w)},w=function(){this.entries=[]},b=function(e,t){return m(e.entries,(function(e){return e[0]===t}))};w.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var r=b(this,e);r?r[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&g(this.entries,t,1),!!~t}},e.exports={getConstructor:function(e,t,r,n){var u=e((function(e,i){l(e,p),f(e,{type:t,id:_++,frozen:void 0}),null!=i&&c(i,e[n],{that:e,AS_ENTRIES:r})})),p=u.prototype,m=h(t),v=function(e,t,r){var n=m(e),i=o(a(t),!0);return!0===i?y(n).set(t,r):i[n.id]=r,e};return i(p,{delete:function(e){var t=m(this);if(!s(e))return!1;var r=o(e);return!0===r?y(t).delete(e):r&&d(r,t.id)&&delete r[t.id]},has:function(e){var t=m(this);if(!s(e))return!1;var r=o(e);return!0===r?y(t).has(e):r&&d(r,t.id)}}),i(p,r?{get:function(e){var t=m(this);if(s(e)){var r=o(e);return!0===r?y(t).get(e):r?r[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),u}}},34535:function(e,t,r){"use strict";var n=r(93085),i=r(98576),o=r(32861),a=r(76192),s=r(98711),l=r(33442),c=r(46961),u=r(16447),d=r(35744),p=r(11284),f=r(42760).f,h=r(50454).forEach,m=r(50069),v=r(73326),g=v.set,_=v.getterFor;e.exports=function(e,t,r){var v,y=-1!==e.indexOf("Map"),w=-1!==e.indexOf("Weak"),b=y?"set":"add",x=i[e],E=x&&x.prototype,S={};if(m&&u(x)&&(w||E.forEach&&!a((function(){(new x).entries().next()})))){var C=(v=t((function(t,r){g(c(t,C),{type:e,collection:new x}),null!=r&&l(r,t[b],{that:t,AS_ENTRIES:y})}))).prototype,j=_(e);h(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in E)||w&&"clear"==e||s(C,e,(function(r,n){var i=j(this).collection;if(!t&&w&&!d(r))return"get"==e&&void 0;var o=i[e](0===r?0:r,n);return t?this:o}))})),w||f(C,"size",{configurable:!0,get:function(){return j(this).collection.size}})}else v=r.getConstructor(t,e,y,b),o.enable();return p(v,e,!1,!0),S[e]=v,n({global:!0,forced:!0},S),w||r.setStrong(v,e,y),v}},97987:function(e,t,r){var n=r(64500),i=r(93011),o=r(5141),a=r(42760);e.exports=function(e,t,r){for(var s=i(t),l=a.f,c=o.f,u=0;u0&&n[0]<4?1:+(n[0]+n[1])),!i&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},12626:function(e,t,r){var n=r(78989).match(/AppleWebKit\/(\d+)\./);e.exports=!!n&&+n[1]},45607:function(e,t,r){var n=r(57545);e.exports=function(e){return n[e+"Prototype"]}},82952:function(e){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},50274:function(e,t,r){var n=r(76192),i=r(90774);e.exports=!n((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},93085:function(e,t,r){"use strict";var n=r(98576),i=r(86298),o=r(84120),a=r(16447),s=r(5141).f,l=r(89245),c=r(57545),u=r(8043),d=r(98711),p=r(64500),f=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return i(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var r,i,h,m,v,g,_,y,w=e.target,b=e.global,x=e.stat,E=e.proto,S=b?n:x?n[w]:(n[w]||{}).prototype,C=b?c:c[w]||d(c,w,{})[w],j=C.prototype;for(h in t)r=!l(b?h:w+(x?".":"#")+h,e.forced)&&S&&p(S,h),v=C[h],r&&(g=e.noTargetGet?(y=s(S,h))&&y.value:S[h]),m=r&&g?g:t[h],r&&typeof v==typeof m||(_=e.bind&&r?u(m,n):e.wrap&&r?f(m):E&&a(m)?o(m):m,(e.sham||m&&m.sham||v&&v.sham)&&d(_,"sham",!0),d(C,h,_),E&&(p(c,i=w+"Prototype")||d(c,i,{}),d(c[i],h,m),e.real&&j&&!j[h]&&d(j,h,m)))}},76192:function(e){e.exports=function(e){try{return!!e()}catch(e){return!0}}},47636:function(e,t,r){var n=r(76192);e.exports=!n((function(){return Object.isExtensible(Object.preventExtensions({}))}))},86298:function(e,t,r){var n=r(22784),i=Function.prototype,o=i.apply,a=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(o):function(){return a.apply(o,arguments)})},8043:function(e,t,r){var n=r(84120),i=r(66235),o=r(22784),a=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:o?a(e,t):function(){return e.apply(t,arguments)}}},22784:function(e,t,r){var n=r(76192);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},16782:function(e,t,r){"use strict";var n=r(98576),i=r(84120),o=r(66235),a=r(35744),s=r(64500),l=r(93096),c=r(22784),u=n.Function,d=i([].concat),p=i([].join),f={},h=function(e,t,r){if(!s(f,t)){for(var n=[],i=0;i_;_++)if((w=N(e[_]))&&u(v,w))return w;return new m(!1)}n=d(e,g)}for(b=n.next;!(x=o(b,n)).done;){try{w=N(x.value)}catch(e){f(n,"throw",e)}if("object"==typeof w&&w&&u(v,w))return w}return new m(!1)}},66639:function(e,t,r){var n=r(18922),i=r(31138),o=r(75037);e.exports=function(e,t,r){var a,s;i(e);try{if(!(a=o(e,"return"))){if("throw"===t)throw r;return r}a=n(a,e)}catch(e){s=!0,a=e}if("throw"===t)throw r;if(s)throw a;return i(a),r}},54413:function(e,t,r){"use strict";var n,i,o,a=r(76192),s=r(16447),l=r(52853),c=r(89341),u=r(49482),d=r(18182),p=r(85546),f=d("iterator"),h=!1;[].keys&&("next"in(o=[].keys())?(i=c(c(o)))!==Object.prototype&&(n=i):h=!0),null==n||a((function(){var e={};return n[f].call(e)!==e}))?n={}:p&&(n=l(n)),s(n[f])||u(n,f,(function(){return this})),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:h}},47771:function(e){e.exports={}},84104:function(e,t,r){var n=r(8445);e.exports=function(e){return n(e.length)}},12950:function(e,t,r){var n,i,o,a,s,l,c,u,d=r(98576),p=r(8043),f=r(5141).f,h=r(67160).set,m=r(69536),v=r(29347),g=r(5914),_=r(58189),y=d.MutationObserver||d.WebKitMutationObserver,w=d.document,b=d.process,x=d.Promise,E=f(d,"queueMicrotask"),S=E&&E.value;S||(n=function(){var e,t;for(_&&(e=b.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},m||_||g||!y||!w?!v&&x&&x.resolve?((c=x.resolve(void 0)).constructor=x,u=p(c.then,c),a=function(){u(n)}):_?a=function(){b.nextTick(n)}:(h=p(h,d),a=function(){h(n)}):(s=!0,l=w.createTextNode(""),new y(n).observe(l,{characterData:!0}),a=function(){l.data=s=!s})),e.exports=S||function(e){var t={fn:e,next:void 0};o&&(o.next=t),i||(i=t,a()),o=t}},22324:function(e,t,r){var n=r(23045);e.exports=n&&!!Symbol.for&&!!Symbol.keyFor},23045:function(e,t,r){var n=r(14218),i=r(76192);e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},74551:function(e,t,r){var n=r(76192),i=r(18182),o=r(85546),a=i("iterator");e.exports=!n((function(){var e=new URL("b?a=1&b=2&c=3","http://a"),t=e.searchParams,r="";return e.pathname="c%20d",t.forEach((function(e,n){t.delete("b"),r+=n+e})),o&&!e.toJSON||!t.sort||"http://a/c%20d?a=1&c=3"!==e.href||"3"!==t.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!t[a]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("http://тест").host||"#%D0%B1"!==new URL("http://a#б").hash||"a1c3"!==r||"x"!==new URL("http://x",void 0).host}))},8921:function(e,t,r){var n=r(98576),i=r(16447),o=r(19516),a=n.WeakMap;e.exports=i(a)&&/native code/.test(o(a))},99438:function(e,t,r){"use strict";var n=r(66235),i=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=n(t),this.reject=n(r)};e.exports.f=function(e){return new i(e)}},36016:function(e,t,r){var n=r(44845);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:n(e)}},9703:function(e,t,r){var n=r(98576),i=r(94352),o=n.TypeError;e.exports=function(e){if(i(e))throw o("The method doesn't accept regular expressions");return e}},40015:function(e,t,r){var n=r(98576),i=r(76192),o=r(84120),a=r(44845),s=r(94277).trim,l=r(71450),c=o("".charAt),u=n.parseFloat,d=n.Symbol,p=d&&d.iterator,f=1/u(l+"-0")!=-1/0||p&&!i((function(){u(Object(p))}));e.exports=f?function(e){var t=s(a(e)),r=u(t);return 0===r&&"-"==c(t,0)?-0:r}:u},62558:function(e,t,r){var n=r(98576),i=r(76192),o=r(84120),a=r(44845),s=r(94277).trim,l=r(71450),c=n.parseInt,u=n.Symbol,d=u&&u.iterator,p=/^[+-]?0x/i,f=o(p.exec),h=8!==c(l+"08")||22!==c(l+"0x16")||d&&!i((function(){c(Object(d))}));e.exports=h?function(e,t){var r=s(a(e));return c(r,t>>>0||(f(p,r)?16:10))}:c},52503:function(e,t,r){"use strict";var n=r(50069),i=r(84120),o=r(18922),a=r(76192),s=r(57653),l=r(84750),c=r(56007),u=r(71795),d=r(2202),p=Object.assign,f=Object.defineProperty,h=i([].concat);e.exports=!p||a((function(){if(n&&1!==p({b:1},p(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!=p({},e)[r]||s(p({},t)).join("")!=i}))?function(e,t){for(var r=u(e),i=arguments.length,a=1,p=l.f,f=c.f;i>a;)for(var m,v=d(arguments[a++]),g=p?h(s(v),p(v)):s(v),_=g.length,y=0;_>y;)m=g[y++],n&&!o(f,v,m)||(r[m]=v[m]);return r}:p},52853:function(e,t,r){var n,i=r(31138),o=r(11187),a=r(82952),s=r(14535),l=r(47403),c=r(67449),u=r(69766),d=u("IE_PROTO"),p=function(){},f=function(e){return"